summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/Kconfig9
-rw-r--r--drivers/gpio/gpio-aspeed.c4
-rw-r--r--drivers/gpio/gpio-em.c4
-rw-r--r--drivers/gpio/gpio-pxa.c14
-rw-r--r--drivers/gpio/gpio-rcar.c4
-rw-r--r--drivers/gpio/gpio-tegra.c4
-rw-r--r--drivers/gpio/gpio-tz1090.c4
-rw-r--r--drivers/gpio/gpiolib.c4
8 files changed, 14 insertions, 33 deletions
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 29fc15423299..d6a8e851ad13 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -834,15 +834,6 @@ config GPIO_PCF857X
834 This driver provides an in-kernel interface to those GPIOs using 834 This driver provides an in-kernel interface to those GPIOs using
835 platform-neutral GPIO calls. 835 platform-neutral GPIO calls.
836 836
837config GPIO_SX150X
838 bool "Semtech SX150x I2C GPIO expander (deprecated)"
839 depends on PINCTRL && I2C=y
840 select PINCTRL_SX150X
841 default n
842 help
843 Say yes here to provide support for Semtech SX150x-series I2C
844 GPIO expanders. The GPIO driver was replaced by a Pinctrl version.
845
846config GPIO_TPIC2810 837config GPIO_TPIC2810
847 tristate "TPIC2810 8-Bit I2C GPO expander" 838 tristate "TPIC2810 8-Bit I2C GPO expander"
848 help 839 help
diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index 8781817d9003..6b3ca6601af2 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -539,12 +539,12 @@ static int aspeed_gpio_request(struct gpio_chip *chip, unsigned int offset)
539 if (!have_gpio(gpiochip_get_data(chip), offset)) 539 if (!have_gpio(gpiochip_get_data(chip), offset))
540 return -ENODEV; 540 return -ENODEV;
541 541
542 return pinctrl_request_gpio(chip->base + offset); 542 return pinctrl_gpio_request(chip->base + offset);
543} 543}
544 544
545static void aspeed_gpio_free(struct gpio_chip *chip, unsigned int offset) 545static void aspeed_gpio_free(struct gpio_chip *chip, unsigned int offset)
546{ 546{
547 pinctrl_free_gpio(chip->base + offset); 547 pinctrl_gpio_free(chip->base + offset);
548} 548}
549 549
550static inline void __iomem *bank_debounce_reg(struct aspeed_gpio *gpio, 550static inline void __iomem *bank_debounce_reg(struct aspeed_gpio *gpio,
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index 8d32ccc980d9..b86e09e1b13b 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -239,12 +239,12 @@ static int em_gio_to_irq(struct gpio_chip *chip, unsigned offset)
239 239
240static int em_gio_request(struct gpio_chip *chip, unsigned offset) 240static int em_gio_request(struct gpio_chip *chip, unsigned offset)
241{ 241{
242 return pinctrl_request_gpio(chip->base + offset); 242 return pinctrl_gpio_request(chip->base + offset);
243} 243}
244 244
245static void em_gio_free(struct gpio_chip *chip, unsigned offset) 245static void em_gio_free(struct gpio_chip *chip, unsigned offset)
246{ 246{
247 pinctrl_free_gpio(chip->base + offset); 247 pinctrl_gpio_free(chip->base + offset);
248 248
249 /* Set the GPIO as an input to ensure that the next GPIO request won't 249 /* Set the GPIO as an input to ensure that the next GPIO request won't
250 * drive the GPIO pin as an output. 250 * drive the GPIO pin as an output.
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 6029899789f3..f480fb896963 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -330,16 +330,6 @@ static int pxa_gpio_of_xlate(struct gpio_chip *gc,
330} 330}
331#endif 331#endif
332 332
333static int pxa_gpio_request(struct gpio_chip *chip, unsigned int offset)
334{
335 return pinctrl_request_gpio(chip->base + offset);
336}
337
338static void pxa_gpio_free(struct gpio_chip *chip, unsigned int offset)
339{
340 pinctrl_free_gpio(chip->base + offset);
341}
342
343static int pxa_init_gpio_chip(struct pxa_gpio_chip *pchip, int ngpio, 333static int pxa_init_gpio_chip(struct pxa_gpio_chip *pchip, int ngpio,
344 struct device_node *np, void __iomem *regbase) 334 struct device_node *np, void __iomem *regbase)
345{ 335{
@@ -358,8 +348,8 @@ static int pxa_init_gpio_chip(struct pxa_gpio_chip *pchip, int ngpio,
358 pchip->chip.set = pxa_gpio_set; 348 pchip->chip.set = pxa_gpio_set;
359 pchip->chip.to_irq = pxa_gpio_to_irq; 349 pchip->chip.to_irq = pxa_gpio_to_irq;
360 pchip->chip.ngpio = ngpio; 350 pchip->chip.ngpio = ngpio;
361 pchip->chip.request = pxa_gpio_request; 351 pchip->chip.request = gpiochip_generic_request;
362 pchip->chip.free = pxa_gpio_free; 352 pchip->chip.free = gpiochip_generic_free;
363#ifdef CONFIG_OF_GPIO 353#ifdef CONFIG_OF_GPIO
364 pchip->chip.of_node = np; 354 pchip->chip.of_node = np;
365 pchip->chip.of_xlate = pxa_gpio_of_xlate; 355 pchip->chip.of_xlate = pxa_gpio_of_xlate;
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 0ea998a3e357..e76de57dd617 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -250,7 +250,7 @@ static int gpio_rcar_request(struct gpio_chip *chip, unsigned offset)
250 if (error < 0) 250 if (error < 0)
251 return error; 251 return error;
252 252
253 error = pinctrl_request_gpio(chip->base + offset); 253 error = pinctrl_gpio_request(chip->base + offset);
254 if (error) 254 if (error)
255 pm_runtime_put(&p->pdev->dev); 255 pm_runtime_put(&p->pdev->dev);
256 256
@@ -261,7 +261,7 @@ static void gpio_rcar_free(struct gpio_chip *chip, unsigned offset)
261{ 261{
262 struct gpio_rcar_priv *p = gpiochip_get_data(chip); 262 struct gpio_rcar_priv *p = gpiochip_get_data(chip);
263 263
264 pinctrl_free_gpio(chip->base + offset); 264 pinctrl_gpio_free(chip->base + offset);
265 265
266 /* 266 /*
267 * Set the GPIO as an input to ensure that the next GPIO request won't 267 * Set the GPIO as an input to ensure that the next GPIO request won't
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index fbaf974277df..8db47f671708 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -141,14 +141,14 @@ static void tegra_gpio_disable(struct tegra_gpio_info *tgi, unsigned int gpio)
141 141
142static int tegra_gpio_request(struct gpio_chip *chip, unsigned int offset) 142static int tegra_gpio_request(struct gpio_chip *chip, unsigned int offset)
143{ 143{
144 return pinctrl_request_gpio(offset); 144 return pinctrl_gpio_request(offset);
145} 145}
146 146
147static void tegra_gpio_free(struct gpio_chip *chip, unsigned int offset) 147static void tegra_gpio_free(struct gpio_chip *chip, unsigned int offset)
148{ 148{
149 struct tegra_gpio_info *tgi = gpiochip_get_data(chip); 149 struct tegra_gpio_info *tgi = gpiochip_get_data(chip);
150 150
151 pinctrl_free_gpio(offset); 151 pinctrl_gpio_free(offset);
152 tegra_gpio_disable(tgi, offset); 152 tegra_gpio_disable(tgi, offset);
153} 153}
154 154
diff --git a/drivers/gpio/gpio-tz1090.c b/drivers/gpio/gpio-tz1090.c
index 22c5be65051f..0bb9bb583889 100644
--- a/drivers/gpio/gpio-tz1090.c
+++ b/drivers/gpio/gpio-tz1090.c
@@ -232,7 +232,7 @@ static int tz1090_gpio_request(struct gpio_chip *chip, unsigned int offset)
232 struct tz1090_gpio_bank *bank = gpiochip_get_data(chip); 232 struct tz1090_gpio_bank *bank = gpiochip_get_data(chip);
233 int ret; 233 int ret;
234 234
235 ret = pinctrl_request_gpio(chip->base + offset); 235 ret = pinctrl_gpio_request(chip->base + offset);
236 if (ret) 236 if (ret)
237 return ret; 237 return ret;
238 238
@@ -246,7 +246,7 @@ static void tz1090_gpio_free(struct gpio_chip *chip, unsigned int offset)
246{ 246{
247 struct tz1090_gpio_bank *bank = gpiochip_get_data(chip); 247 struct tz1090_gpio_bank *bank = gpiochip_get_data(chip);
248 248
249 pinctrl_free_gpio(chip->base + offset); 249 pinctrl_gpio_free(chip->base + offset);
250 250
251 tz1090_gpio_clear_bit(bank, REG_GPIO_BIT_EN, offset); 251 tz1090_gpio_clear_bit(bank, REG_GPIO_BIT_EN, offset);
252} 252}
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 641a5eb552cb..aad84a6306c4 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1962,7 +1962,7 @@ static inline void gpiochip_irqchip_free_valid_mask(struct gpio_chip *gpiochip)
1962 */ 1962 */
1963int gpiochip_generic_request(struct gpio_chip *chip, unsigned offset) 1963int gpiochip_generic_request(struct gpio_chip *chip, unsigned offset)
1964{ 1964{
1965 return pinctrl_request_gpio(chip->gpiodev->base + offset); 1965 return pinctrl_gpio_request(chip->gpiodev->base + offset);
1966} 1966}
1967EXPORT_SYMBOL_GPL(gpiochip_generic_request); 1967EXPORT_SYMBOL_GPL(gpiochip_generic_request);
1968 1968
@@ -1973,7 +1973,7 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_request);
1973 */ 1973 */
1974void gpiochip_generic_free(struct gpio_chip *chip, unsigned offset) 1974void gpiochip_generic_free(struct gpio_chip *chip, unsigned offset)
1975{ 1975{
1976 pinctrl_free_gpio(chip->gpiodev->base + offset); 1976 pinctrl_gpio_free(chip->gpiodev->base + offset);
1977} 1977}
1978EXPORT_SYMBOL_GPL(gpiochip_generic_free); 1978EXPORT_SYMBOL_GPL(gpiochip_generic_free);
1979 1979