Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpiolib: remove gpio_set_debounce()

gpio_set_debounce() only has a single user, which is trivially
converted to gpiod_set_debounce().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

authored by

Arnd Bergmann and committed by
Andy Shevchenko
0e685c3e eccb7a00

+3 -16
-2
Documentation/driver-api/gpio/legacy.rst
··· 238 238 ## gpio_free_array() 239 239 240 240 gpio_free() 241 - gpio_set_debounce() 242 - 243 241 244 242 245 243 Claiming and Releasing GPIOs
-1
Documentation/translations/zh_CN/driver-api/gpio/legacy.rst
··· 219 219 ## gpio_free_array() 220 220 221 221 gpio_free() 222 - gpio_set_debounce() 223 222 224 223 225 224
-1
Documentation/translations/zh_TW/gpio.txt
··· 226 226 ## gpio_free_array() 227 227 228 228 gpio_free() 229 - gpio_set_debounce() 230 229 231 230 232 231
+3 -2
drivers/input/touchscreen/ads7846.c
··· 27 27 #include <linux/of.h> 28 28 #include <linux/of_gpio.h> 29 29 #include <linux/of_device.h> 30 + #include <linux/gpio/consumer.h> 30 31 #include <linux/gpio.h> 31 32 #include <linux/spi/spi.h> 32 33 #include <linux/spi/ads7846.h> ··· 1013 1012 ts->gpio_pendown = pdata->gpio_pendown; 1014 1013 1015 1014 if (pdata->gpio_pendown_debounce) 1016 - gpio_set_debounce(pdata->gpio_pendown, 1017 - pdata->gpio_pendown_debounce); 1015 + gpiod_set_debounce(gpio_to_desc(ts->gpio_pendown), 1016 + pdata->gpio_pendown_debounce); 1018 1017 } else { 1019 1018 dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n"); 1020 1019 return -EINVAL;
-10
include/linux/gpio.h
··· 100 100 return gpiod_direction_output_raw(gpio_to_desc(gpio), value); 101 101 } 102 102 103 - static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) 104 - { 105 - return gpiod_set_debounce(gpio_to_desc(gpio), debounce); 106 - } 107 - 108 103 static inline int gpio_get_value_cansleep(unsigned gpio) 109 104 { 110 105 return gpiod_get_raw_value_cansleep(gpio_to_desc(gpio)); ··· 205 210 } 206 211 207 212 static inline int gpio_direction_output(unsigned gpio, int value) 208 - { 209 - return -ENOSYS; 210 - } 211 - 212 - static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) 213 213 { 214 214 return -ENOSYS; 215 215 }