regmap-irq: do not write mask register if mask_base is zero
If client have not provided the mask base register then do not write into the mask register. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com> Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Signed-off-by: Mark Zhang <markz@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1cd824361e
commit
7151449fe7
|
@ -108,6 +108,9 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
|
|||
* suppress pointless writes.
|
||||
*/
|
||||
for (i = 0; i < d->chip->num_regs; i++) {
|
||||
if (!d->chip->mask_base)
|
||||
continue;
|
||||
|
||||
reg = d->chip->mask_base +
|
||||
(i * map->reg_stride * d->irq_reg_stride);
|
||||
if (d->chip->mask_invert) {
|
||||
|
@ -588,6 +591,9 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
|
|||
/* Mask all the interrupts by default */
|
||||
for (i = 0; i < chip->num_regs; i++) {
|
||||
d->mask_buf[i] = d->mask_buf_def[i];
|
||||
if (!chip->mask_base)
|
||||
continue;
|
||||
|
||||
reg = chip->mask_base +
|
||||
(i * map->reg_stride * d->irq_reg_stride);
|
||||
if (chip->mask_invert)
|
||||
|
|
Loading…
Reference in New Issue