mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
gpio updates for v5.19-rc1
- use the correct register for regcache sync in gpio-pca953x - remove unused and potentially harmful code from gpio-adp5588 - MAINTAINERS update -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmKaGWMACgkQEacuoBRx 13Id+Q//YNQg4q1ssFICa2GUDEDFjUamzF4Pg+rlQFsohD1krS65uumhDWcrOtzs 3fVYZV1cyjsLahtRXyUe/mqeQCNNCa5/GWhl1zwxoQZiieTg2jS+jVpLkbfR6vz7 Yo6xh8JwiVBypKdErWpn9PNuU2tAkOVFEy40/XKGvP27ZnVlJuMZ73Tdtw7DWyjV UGewtAR09Nn5lAGejktXjAP8scnooubQb0AVlpu78onDpbht1juzy/UVCJGjsL60 6h1iL8rYT/ZUUtrtPCkc5zcjPaBf+islrH9ercq8NwsR4oZt1y3EXTqibSZZmEHs xrF7RBDRRnMcA+wn6Ou2k6k3Drbb921pw44vmkUQ4S0qqYQ1IjdTtnoonRBty56b QbEszdNds1Vb+LAdw3O1aVvmlQqgxpOxZ1p/yqXa13NFcmXlb/sBTNbpiOLqowI+ CCuwj9AHN1mtecjv9VwbZcABIJb20oSi6Eg1sjdSq40bSsOufCdM1pXv1/IbtWYw U5Q9x+6P+zST/fOtdRvQZMg0Di9ltTdiiBbGt9L8SBaQNMAlFTmRk/m78RXCvCMy RQ+iaWP+HSP51YqGVeQ0+DhXJezy2Xpk/8tn8dZZsypRhwkwX3Dar1Iu9F0I38sl DJt1C6uk6IWoRID2gorgB6xA9CkKTbQhCCDjIS0Rx89dddnWaHI= =2+3k -----END PGP SIGNATURE----- Merge tag 'gpio-fixes-for-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux 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
This commit is contained in:
commit
032dcf09e2
@ -8422,7 +8422,7 @@ M: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
M: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
L: linux-gpio@vger.kernel.org
|
||||
L: linux-acpi@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git
|
||||
F: Documentation/firmware-guide/acpi/gpio-properties.rst
|
||||
F: drivers/gpio/gpiolib-acpi.c
|
||||
@ -9887,7 +9887,7 @@ F: drivers/video/fbdev/intelfb/
|
||||
INTEL GPIO DRIVERS
|
||||
M: Andy Shevchenko <andy@kernel.org>
|
||||
L: linux-gpio@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git
|
||||
F: drivers/gpio/gpio-ich.c
|
||||
F: drivers/gpio/gpio-merrifield.c
|
||||
@ -10108,7 +10108,7 @@ F: drivers/platform/x86/intel/pmc/
|
||||
|
||||
INTEL PMIC GPIO DRIVERS
|
||||
M: Andy Shevchenko <andy@kernel.org>
|
||||
S: Maintained
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git
|
||||
F: drivers/gpio/gpio-*cove.c
|
||||
|
||||
|
@ -406,12 +406,6 @@ static int adp5588_gpio_probe(struct i2c_client *client)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (pdata && pdata->setup) {
|
||||
ret = pdata->setup(client, gc->base, gc->ngpio, pdata->context);
|
||||
if (ret < 0)
|
||||
dev_warn(&client->dev, "setup failed, %d\n", ret);
|
||||
}
|
||||
|
||||
i2c_set_clientdata(client, dev);
|
||||
|
||||
return 0;
|
||||
@ -419,20 +413,7 @@ static int adp5588_gpio_probe(struct i2c_client *client)
|
||||
|
||||
static int adp5588_gpio_remove(struct i2c_client *client)
|
||||
{
|
||||
struct adp5588_gpio_platform_data *pdata =
|
||||
dev_get_platdata(&client->dev);
|
||||
struct adp5588_gpio *dev = i2c_get_clientdata(client);
|
||||
int ret;
|
||||
|
||||
if (pdata && pdata->teardown) {
|
||||
ret = pdata->teardown(client,
|
||||
dev->gpio_chip.base, dev->gpio_chip.ngpio,
|
||||
pdata->context);
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev, "teardown failed %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (dev->client->irq)
|
||||
free_irq(dev->client->irq, dev);
|
||||
|
@ -1120,20 +1120,21 @@ static int pca953x_regcache_sync(struct device *dev)
|
||||
{
|
||||
struct pca953x_chip *chip = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
u8 regaddr;
|
||||
|
||||
/*
|
||||
* The ordering between direction and output is important,
|
||||
* sync these registers first and only then sync the rest.
|
||||
*/
|
||||
ret = regcache_sync_region(chip->regmap, chip->regs->direction,
|
||||
chip->regs->direction + NBANK(chip));
|
||||
regaddr = pca953x_recalc_addr(chip, chip->regs->direction, 0);
|
||||
ret = regcache_sync_region(chip->regmap, regaddr, regaddr + NBANK(chip));
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to sync GPIO dir registers: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = regcache_sync_region(chip->regmap, chip->regs->output,
|
||||
chip->regs->output + NBANK(chip));
|
||||
regaddr = pca953x_recalc_addr(chip, chip->regs->output, 0);
|
||||
ret = regcache_sync_region(chip->regmap, regaddr, regaddr + NBANK(chip));
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to sync GPIO out registers: %d\n", ret);
|
||||
return ret;
|
||||
@ -1141,16 +1142,18 @@ static int pca953x_regcache_sync(struct device *dev)
|
||||
|
||||
#ifdef CONFIG_GPIO_PCA953X_IRQ
|
||||
if (chip->driver_data & PCA_PCAL) {
|
||||
ret = regcache_sync_region(chip->regmap, PCAL953X_IN_LATCH,
|
||||
PCAL953X_IN_LATCH + NBANK(chip));
|
||||
regaddr = pca953x_recalc_addr(chip, PCAL953X_IN_LATCH, 0);
|
||||
ret = regcache_sync_region(chip->regmap, regaddr,
|
||||
regaddr + NBANK(chip));
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to sync INT latch registers: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = regcache_sync_region(chip->regmap, PCAL953X_INT_MASK,
|
||||
PCAL953X_INT_MASK + NBANK(chip));
|
||||
regaddr = pca953x_recalc_addr(chip, PCAL953X_INT_MASK, 0);
|
||||
ret = regcache_sync_region(chip->regmap, regaddr,
|
||||
regaddr + NBANK(chip));
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to sync INT mask registers: %d\n",
|
||||
ret);
|
||||
|
Loading…
Reference in New Issue
Block a user