Commit f8af9113 authored by Linus Walleij's avatar Linus Walleij
Browse files

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -439,7 +439,7 @@ config GPIO_PMIC_EIC_SPRD

config GPIO_PXA
	bool "PXA GPIO support"
	depends on ARCH_PXA || ARCH_MMP
	depends on ARCH_PXA || ARCH_MMP || COMPILE_TEST
	help
	  Say yes here to support the PXA GPIO device

@@ -952,7 +952,7 @@ config GPIO_PCA953X

config GPIO_PCA953X_IRQ
	bool "Interrupt controller support for PCA953x"
	depends on GPIO_PCA953X=y
	depends on GPIO_PCA953X
	select GPIOLIB_IRQCHIP
	help
	  Say yes here to enable the pca953x to be used as an interrupt
+5 −7
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@

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 offset_bits, pin_config;
	int ret;
@@ -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,
				    int value)
{
	struct max7301 *ts = gpiochip_get_data(chip);
	struct max7301 *ts = container_of(chip, struct max7301, chip);
	u8 *config;
	u8 offset_bits;
	int ret;
@@ -189,10 +189,6 @@ int __max730x_probe(struct max7301 *ts)
	ts->chip.parent = dev;
	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
	 * register values for later use.
@@ -214,6 +210,8 @@ int __max730x_probe(struct max7301 *ts)
		}
	}

	ret = gpiochip_add_data(&ts->chip, ts);
	if (!ret)
		return ret;

exit_destroy: