Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pinctrl: cy8c95x0: Don't miss reading the last bank registers

When code had been changed to use for_each_set_clump8(), it mistakenly
switched from chip->nport to chip->tpin since the cy8c9540 and cy8c9560
have a 4-pin gap. This, in particular, led to the missed read of
the last bank interrupt status register and hence missing interrupts
on those pins. Restore the upper limit in for_each_set_clump8() to take
into consideration that gap.

Fixes: 83e29a7a1fdf ("pinctrl: cy8c95x0; Switch to use for_each_set_clump8()")
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>

authored by

Andy Shevchenko and committed by
Linus Walleij
b6c3af46 01e10d02

+2 -2
+2 -2
drivers/pinctrl/pinctrl-cy8c95x0.c
··· 627 627 bitmap_scatter(tmask, mask, chip->map, MAX_LINE); 628 628 bitmap_scatter(tval, val, chip->map, MAX_LINE); 629 629 630 - for_each_set_clump8(offset, bits, tmask, chip->tpin) { 630 + for_each_set_clump8(offset, bits, tmask, chip->nport * BANK_SZ) { 631 631 unsigned int i = offset / 8; 632 632 633 633 write_val = bitmap_get_value8(tval, offset); ··· 655 655 bitmap_scatter(tmask, mask, chip->map, MAX_LINE); 656 656 bitmap_scatter(tval, val, chip->map, MAX_LINE); 657 657 658 - for_each_set_clump8(offset, bits, tmask, chip->tpin) { 658 + for_each_set_clump8(offset, bits, tmask, chip->nport * BANK_SZ) { 659 659 unsigned int i = offset / 8; 660 660 661 661 ret = cy8c95x0_regmap_read_bits(chip, reg, i, bits, &read_val);