Pull gpio fixes from Bartosz Golaszewski: - use the correct register for regcache sync in gpio-pca953x - remove unused and potentially harmful code from gpio-adp5588 - MAINTAINERS update * tag 'gpio-fixes-for-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: adp5588: Remove support for platform setup and teardown callbacks gpio: pca953x: use the correct register address to do regcache sync MAINTAINERS: Update Intel GPIO (PMIC and PCH) to Supported MAINTAINERS: Update GPIO ACPI library to Supported
Unified · Split
| @@ -8422,7 +8422,7 @@ M: Mika Westerberg <mika.westerberg@linux.intel.com> · 8421 unmodified lines | ||
| 8422 | 8422 | M: Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
| 8423 | 8423 | L: linux-gpio@vger.kernel.org |
| 8424 | 8424 | L: linux-acpi@vger.kernel.org |
| 8425 | −S: Maintained | |
| 8425 | +S: Supported | |
| 8426 | 8426 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git |
| 8427 | 8427 | F: Documentation/firmware-guide/acpi/gpio-properties.rst |
| 8428 | 8428 | F: drivers/gpio/gpiolib-acpi.c |
| @@ -9887,7 +9887,7 @@ F: drivers/video/fbdev/intelfb/ · 1458 unmodified lines | ||
| 9887 | 9887 | INTEL GPIO DRIVERS |
| 9888 | 9888 | M: Andy Shevchenko <andy@kernel.org> |
| 9889 | 9889 | L: linux-gpio@vger.kernel.org |
| 9890 | −S: Maintained | |
| 9890 | +S: Supported | |
| 9891 | 9891 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git |
| 9892 | 9892 | F: drivers/gpio/gpio-ich.c |
| 9893 | 9893 | F: drivers/gpio/gpio-merrifield.c |
| @@ -10108,7 +10108,7 @@ F: drivers/platform/x86/intel/pmc/ · 214 unmodified lines | ||
| 10108 | 10108 | |
| 10109 | 10109 | INTEL PMIC GPIO DRIVERS |
| 10110 | 10110 | M: Andy Shevchenko <andy@kernel.org> |
| 10111 | −S: Maintained | |
| 10111 | +S: Supported | |
| 10112 | 10112 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git |
| 10113 | 10113 | F: drivers/gpio/gpio-*cove.c |
| 10114 | 10114 | |
| @@ -406,12 +406,6 @@ static int adp5588_gpio_probe(struct i2c_client *client) · 405 unmodified lines | ||
| 406 | 406 | if (ret) |
| 407 | 407 | return ret; |
| 408 | 408 | |
| 409 | − if (pdata && pdata->setup) { | |
| 410 | − ret = pdata->setup(client, gc->base, gc->ngpio, pdata->context); | |
| 411 | − if (ret < 0) | |
| 412 | − dev_warn(&client->dev, "setup failed, %d\n", ret); | |
| 413 | − } | |
| 414 | − | |
| 415 | 409 | i2c_set_clientdata(client, dev); |
| 416 | 410 | |
| 417 | 411 | return 0; |
| @@ -419,20 +413,7 @@ static int adp5588_gpio_probe(struct i2c_client *client) · 1 unmodified line | ||
| 419 | 413 | |
| 420 | 414 | static int adp5588_gpio_remove(struct i2c_client *client) |
| 421 | 415 | { |
| 422 | − struct adp5588_gpio_platform_data *pdata = | |
| 423 | − dev_get_platdata(&client->dev); | |
| 424 | 416 | struct adp5588_gpio *dev = i2c_get_clientdata(client); |
| 425 | − int ret; | |
| 426 | − | |
| 427 | − if (pdata && pdata->teardown) { | |
| 428 | − ret = pdata->teardown(client, | |
| 429 | − dev->gpio_chip.base, dev->gpio_chip.ngpio, | |
| 430 | − pdata->context); | |
| 431 | − if (ret < 0) { | |
| 432 | − dev_err(&client->dev, "teardown failed %d\n", ret); | |
| 433 | − return ret; | |
| 434 | − } | |
| 435 | − } | |
| 436 | 417 | |
| 437 | 418 | if (dev->client->irq) |
| 438 | 419 | free_irq(dev->client->irq, dev); |
| @@ -1120,20 +1120,21 @@ static int pca953x_regcache_sync(struct device *dev) · 1119 unmodified lines | ||
| 1120 | 1120 | { |
| 1121 | 1121 | struct pca953x_chip *chip = dev_get_drvdata(dev); |
| 1122 | 1122 | int ret; |
| 1123 | + u8 regaddr; | |
| 1123 | 1124 | |
| 1124 | 1125 | /* |
| 1125 | 1126 | * The ordering between direction and output is important, |
| 1126 | 1127 | * sync these registers first and only then sync the rest. |
| 1127 | 1128 | */ |
| 1128 | − ret = regcache_sync_region(chip->regmap, chip->regs->direction, | |
| 1129 | − chip->regs->direction + NBANK(chip)); | |
| 1129 | + regaddr = pca953x_recalc_addr(chip, chip->regs->direction, 0); | |
| 1130 | + ret = regcache_sync_region(chip->regmap, regaddr, regaddr + NBANK(chip)); | |
| 1130 | 1131 | if (ret) { |
| 1131 | 1132 | dev_err(dev, "Failed to sync GPIO dir registers: %d\n", ret); |
| 1132 | 1133 | return ret; |
| 1133 | 1134 | } |
| 1134 | 1135 | |
| 1135 | − ret = regcache_sync_region(chip->regmap, chip->regs->output, | |
| 1136 | − chip->regs->output + NBANK(chip)); | |
| 1136 | + regaddr = pca953x_recalc_addr(chip, chip->regs->output, 0); | |
| 1137 | + ret = regcache_sync_region(chip->regmap, regaddr, regaddr + NBANK(chip)); | |
| 1137 | 1138 | if (ret) { |
| 1138 | 1139 | dev_err(dev, "Failed to sync GPIO out registers: %d\n", ret); |
| 1139 | 1140 | return ret; |
| @@ -1141,16 +1142,18 @@ static int pca953x_regcache_sync(struct device *dev) · 1 unmodified line | ||
| 1141 | 1142 | |
| 1142 | 1143 | #ifdef CONFIG_GPIO_PCA953X_IRQ |
| 1143 | 1144 | if (chip->driver_data & PCA_PCAL) { |
| 1144 | − ret = regcache_sync_region(chip->regmap, PCAL953X_IN_LATCH, | |
| 1145 | − PCAL953X_IN_LATCH + NBANK(chip)); | |
| 1145 | + regaddr = pca953x_recalc_addr(chip, PCAL953X_IN_LATCH, 0); | |
| 1146 | + ret = regcache_sync_region(chip->regmap, regaddr, | |
| 1147 | + regaddr + NBANK(chip)); | |
| 1146 | 1148 | if (ret) { |
| 1147 | 1149 | dev_err(dev, "Failed to sync INT latch registers: %d\n", |
| 1148 | 1150 | ret); |
| 1149 | 1151 | return ret; |
| 1150 | 1152 | } |
| 1151 | 1153 | |
| 1152 | − ret = regcache_sync_region(chip->regmap, PCAL953X_INT_MASK, | |
| 1153 | − PCAL953X_INT_MASK + NBANK(chip)); | |
| 1154 | + regaddr = pca953x_recalc_addr(chip, PCAL953X_INT_MASK, 0); | |
| 1155 | + ret = regcache_sync_region(chip->regmap, regaddr, | |
| 1156 | + regaddr + NBANK(chip)); | |
| 1154 | 1157 | if (ret) { |
| 1155 | 1158 | dev_err(dev, "Failed to sync INT mask registers: %d\n", |
| 1156 | 1159 | ret); |