Commit f8af9113 authored by Linus Walleij's avatar Linus Walleij

Merge tag 'gpio-updates-for-v5.8-part2' of...

Merge tag 'gpio-updates-for-v5.8-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel

gpio: updates for v5.8 - part 2

- fix the initialization ordering in gpio-max730x
- make gpio-pxa buildable for compile testing
- make gpio-pca953x buildable as a module
parents 6f8cd246 e33a58a2
...@@ -439,7 +439,7 @@ config GPIO_PMIC_EIC_SPRD ...@@ -439,7 +439,7 @@ config GPIO_PMIC_EIC_SPRD
config GPIO_PXA config GPIO_PXA
bool "PXA GPIO support" bool "PXA GPIO support"
depends on ARCH_PXA || ARCH_MMP depends on ARCH_PXA || ARCH_MMP || COMPILE_TEST
help help
Say yes here to support the PXA GPIO device Say yes here to support the PXA GPIO device
...@@ -952,7 +952,7 @@ config GPIO_PCA953X ...@@ -952,7 +952,7 @@ config GPIO_PCA953X
config GPIO_PCA953X_IRQ config GPIO_PCA953X_IRQ
bool "Interrupt controller support for PCA953x" bool "Interrupt controller support for PCA953x"
depends on GPIO_PCA953X=y depends on GPIO_PCA953X
select GPIOLIB_IRQCHIP select GPIOLIB_IRQCHIP
help help
Say yes here to enable the pca953x to be used as an interrupt Say yes here to enable the pca953x to be used as an interrupt
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
static int max7301_direction_input(struct gpio_chip *chip, unsigned offset) static int max7301_direction_input(struct gpio_chip *chip, unsigned offset)
{ {
struct max7301 *ts = gpiochip_get_data(chip); struct max7301 *ts = container_of(chip, struct max7301, chip);
u8 *config; u8 *config;
u8 offset_bits, pin_config; u8 offset_bits, pin_config;
int ret; int ret;
...@@ -89,7 +89,7 @@ static int __max7301_set(struct max7301 *ts, unsigned offset, int value) ...@@ -89,7 +89,7 @@ static int __max7301_set(struct max7301 *ts, unsigned offset, int value)
static int max7301_direction_output(struct gpio_chip *chip, unsigned offset, static int max7301_direction_output(struct gpio_chip *chip, unsigned offset,
int value) int value)
{ {
struct max7301 *ts = gpiochip_get_data(chip); struct max7301 *ts = container_of(chip, struct max7301, chip);
u8 *config; u8 *config;
u8 offset_bits; u8 offset_bits;
int ret; int ret;
...@@ -189,10 +189,6 @@ int __max730x_probe(struct max7301 *ts) ...@@ -189,10 +189,6 @@ int __max730x_probe(struct max7301 *ts)
ts->chip.parent = dev; ts->chip.parent = dev;
ts->chip.owner = THIS_MODULE; ts->chip.owner = THIS_MODULE;
ret = gpiochip_add_data(&ts->chip, ts);
if (ret)
goto exit_destroy;
/* /*
* initialize pullups according to platform data and cache the * initialize pullups according to platform data and cache the
* register values for later use. * register values for later use.
...@@ -214,7 +210,9 @@ int __max730x_probe(struct max7301 *ts) ...@@ -214,7 +210,9 @@ int __max730x_probe(struct max7301 *ts)
} }
} }
return ret; ret = gpiochip_add_data(&ts->chip, ts);
if (!ret)
return ret;
exit_destroy: exit_destroy:
mutex_destroy(&ts->lock); mutex_destroy(&ts->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment