gpio: mcp23s08: move to pinctrl
authorSebastian Reichel <sebastian.reichel@collabora.co.uk>
Mon, 15 May 2017 09:24:25 +0000 (11:24 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 23 May 2017 07:45:29 +0000 (09:45 +0200)
This moves the mcp23s08 driver from gpio to pinctrl. Actual
pinctrl support for configuration of the pull-up resistors
follows in its own patch.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/configs/lpc32xx_defconfig
arch/blackfin/configs/BF609-EZKIT_defconfig
arch/blackfin/mach-bf527/boards/tll6527m.c
arch/blackfin/mach-bf609/boards/ezkit.c
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/pinctrl/Kconfig
drivers/pinctrl/Makefile
drivers/pinctrl/pinctrl-mcp23s08.c [moved from drivers/gpio/gpio-mcp23s08.c with 100% similarity]

index 6ba430d..e15fa5f 100644 (file)
@@ -112,7 +112,7 @@ CONFIG_GPIO_SX150X=y
 CONFIG_GPIO_74X164=y
 CONFIG_GPIO_MAX7301=y
 CONFIG_GPIO_MC33880=y
-CONFIG_GPIO_MCP23S08=y
+CONFIG_PINCTRL_MCP23S08=y
 CONFIG_SENSORS_DS620=y
 CONFIG_SENSORS_MAX6639=y
 CONFIG_WATCHDOG=y
index ba4267f..3ce77f0 100644 (file)
@@ -105,7 +105,7 @@ CONFIG_SPI=y
 CONFIG_SPI_ADI_V3=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_SYSFS=y
-CONFIG_GPIO_MCP23S08=y
+CONFIG_PINCTRL_MCP23S08=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_BFIN_WDT=y
index c1acce4..be61477 100644 (file)
@@ -348,7 +348,7 @@ static struct platform_device bfin_i2s = {
 };
 #endif
 
-#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
+#if IS_ENABLED(CONFIG_PINCTRL_MCP23S08)
 #include <linux/spi/mcp23s08.h>
 static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = {
        .chip[0].is_present = true,
@@ -423,7 +423,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .mode = SPI_CPHA | SPI_CPOL,
        },
 #endif
-#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
+#if IS_ENABLED(CONFIG_PINCTRL_MCP23S08)
        {
                .modalias = "mcp23s08",
                .platform_data = &bfin_mcp23s08_sys_gpio_info,
index 9231e5a..51157a2 100644 (file)
@@ -1887,7 +1887,7 @@ static struct platform_device i2c_bfin_twi1_device = {
 };
 #endif
 
-#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
+#if IS_ENABLED(CONFIG_PINCTRL_MCP23S08)
 #include <linux/spi/mcp23s08.h>
 static const struct mcp23s08_platform_data bfin_mcp23s08_soft_switch0 = {
        .base = 120,
@@ -1929,7 +1929,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
                I2C_BOARD_INFO("ssm2602", 0x1b),
        },
 #endif
-#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
+#if IS_ENABLED(CONFIG_PINCTRL_MCP23S08)
        {
                I2C_BOARD_INFO("mcp23017", 0x21),
                .platform_data = (void *)&bfin_mcp23s08_soft_switch0
index 23ca51e..5f88d73 100644 (file)
@@ -1227,23 +1227,6 @@ config GPIO_PISOSR
 
 endmenu
 
-menu "SPI or I2C GPIO expanders"
-       depends on (SPI_MASTER && !I2C) || I2C
-
-config GPIO_MCP23S08
-       tristate "Microchip MCP23xxx I/O expander"
-       depends on OF_GPIO
-       select GPIOLIB_IRQCHIP
-       select REGMAP_I2C if I2C
-       select REGMAP if SPI_MASTER
-       help
-         SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017
-         I/O expanders.
-         This provides a GPIO interface supporting inputs and outputs.
-         The I2C versions of the chips can be used as interrupt-controller.
-
-endmenu
-
 menu "USB GPIO expanders"
        depends on USB
 
index 68b9627..89f1006 100644 (file)
@@ -77,7 +77,6 @@ obj-$(CONFIG_GPIO_MENZ127)    += gpio-menz127.o
 obj-$(CONFIG_GPIO_MERRIFIELD)  += gpio-merrifield.o
 obj-$(CONFIG_GPIO_MC33880)     += gpio-mc33880.o
 obj-$(CONFIG_GPIO_MC9S08DZ60)  += gpio-mc9s08dz60.o
-obj-$(CONFIG_GPIO_MCP23S08)    += gpio-mcp23s08.o
 obj-$(CONFIG_GPIO_ML_IOH)      += gpio-ml-ioh.o
 obj-$(CONFIG_GPIO_MM_LANTIQ)   += gpio-mm-lantiq.o
 obj-$(CONFIG_GPIO_MOCKUP)      += gpio-mockup.o
index 37af5e3..b5aa50c 100644 (file)
@@ -146,6 +146,19 @@ config PINCTRL_FALCON
        depends on SOC_FALCON
        depends on PINCTRL_LANTIQ
 
+config PINCTRL_MCP23S08
+       tristate "Microchip MCP23xxx I/O expander"
+       depends on OF_GPIO
+       depends on SPI_MASTER || I2C
+       select GPIOLIB_IRQCHIP
+       select REGMAP_I2C if I2C
+       select REGMAP_SPI if SPI_MASTER
+       help
+         SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017
+         I/O expanders.
+         This provides a GPIO interface supporting inputs and outputs.
+         The I2C versions of the chips can be used as interrupt-controller.
+
 config PINCTRL_MESON
        bool
        depends on OF
index 0e9b222..59d793a 100644 (file)
@@ -19,6 +19,7 @@ obj-$(CONFIG_PINCTRL_DA850_PUPD) += pinctrl-da850-pupd.o
 obj-$(CONFIG_PINCTRL_DIGICOLOR)        += pinctrl-digicolor.o
 obj-$(CONFIG_PINCTRL_FALCON)   += pinctrl-falcon.o
 obj-$(CONFIG_PINCTRL_MAX77620) += pinctrl-max77620.o
+obj-$(CONFIG_PINCTRL_MCP23S08) += pinctrl-mcp23s08.o
 obj-$(CONFIG_PINCTRL_MESON)    += meson/
 obj-$(CONFIG_PINCTRL_OXNAS)    += pinctrl-oxnas.o
 obj-$(CONFIG_PINCTRL_PALMAS)   += pinctrl-palmas.o