Skip to content

Commit 89f2c04

Browse files
committed
Merge tag 'gpio-v5.3-rc7-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes
gpio fixes for v5.3-rc7 - two patches fixing a regression in the pca953x driver
2 parents a55aa89 + 438b6c2 commit 89f2c04

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

drivers/gpio/gpio-pca953x.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,9 @@ static void pca953x_irq_bus_sync_unlock(struct irq_data *d)
604604
u8 new_irqs;
605605
int level, i;
606606
u8 invert_irq_mask[MAX_BANK];
607-
int reg_direction[MAX_BANK];
607+
u8 reg_direction[MAX_BANK];
608608

609-
regmap_bulk_read(chip->regmap, chip->regs->direction, reg_direction,
610-
NBANK(chip));
609+
pca953x_read_regs(chip, chip->regs->direction, reg_direction);
611610

612611
if (chip->driver_data & PCA_PCAL) {
613612
/* Enable latch on interrupt-enabled inputs */
@@ -679,7 +678,7 @@ static bool pca953x_irq_pending(struct pca953x_chip *chip, u8 *pending)
679678
bool pending_seen = false;
680679
bool trigger_seen = false;
681680
u8 trigger[MAX_BANK];
682-
int reg_direction[MAX_BANK];
681+
u8 reg_direction[MAX_BANK];
683682
int ret, i;
684683

685684
if (chip->driver_data & PCA_PCAL) {
@@ -710,8 +709,7 @@ static bool pca953x_irq_pending(struct pca953x_chip *chip, u8 *pending)
710709
return false;
711710

712711
/* Remove output pins from the equation */
713-
regmap_bulk_read(chip->regmap, chip->regs->direction, reg_direction,
714-
NBANK(chip));
712+
pca953x_read_regs(chip, chip->regs->direction, reg_direction);
715713
for (i = 0; i < NBANK(chip); i++)
716714
cur_stat[i] &= reg_direction[i];
717715

@@ -768,7 +766,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
768766
{
769767
struct i2c_client *client = chip->client;
770768
struct irq_chip *irq_chip = &chip->irq_chip;
771-
int reg_direction[MAX_BANK];
769+
u8 reg_direction[MAX_BANK];
772770
int ret, i;
773771

774772
if (!client->irq)
@@ -789,8 +787,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
789787
* interrupt. We have to rely on the previous read for
790788
* this purpose.
791789
*/
792-
regmap_bulk_read(chip->regmap, chip->regs->direction, reg_direction,
793-
NBANK(chip));
790+
pca953x_read_regs(chip, chip->regs->direction, reg_direction);
794791
for (i = 0; i < NBANK(chip); i++)
795792
chip->irq_stat[i] &= reg_direction[i];
796793
mutex_init(&chip->irq_lock);

0 commit comments

Comments
 (0)