Merge tag 'gpio-v5.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jun 2019 15:48:29 +0000 (05:48 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jun 2019 15:48:29 +0000 (05:48 -1000)
Pull GPIO fix from Linus Walleij:
 "A single fix for the PCA953x driver affecting some fringe variants of
  the chip"

* tag 'gpio-v5.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: pca953x: hack to fix 24 bit gpio expanders

drivers/gpio/gpio-pca953x.c

index 2328d04201a98b79f7dc3e8f771f00aa3846d053..cfe827cefad81ef32d732617feb0dd9ed71a2ec4 100644 (file)
@@ -305,7 +305,8 @@ static const struct regmap_config pca953x_i2c_regmap = {
        .volatile_reg = pca953x_volatile_register,
 
        .cache_type = REGCACHE_RBTREE,
-       .max_register = 0x7f,
+       /* REVISIT: should be 0x7f but some 24 bit chips use REG_ADDR_AI */
+       .max_register = 0xff,
 };
 
 static u8 pca953x_recalc_addr(struct pca953x_chip *chip, int reg, int off,