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>
This commit is contained in:
committed by
Andy Shevchenko
parent
eccb7a0061
commit
0e685c3e71
@ -238,8 +238,6 @@ setup or driver probe/teardown code, so this is an easy constraint.)::
|
|||||||
## gpio_free_array()
|
## gpio_free_array()
|
||||||
|
|
||||||
gpio_free()
|
gpio_free()
|
||||||
gpio_set_debounce()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Claiming and Releasing GPIOs
|
Claiming and Releasing GPIOs
|
||||||
|
@ -219,7 +219,6 @@ GPIO 值的命令需要等待其信息排到队首才发送命令,再获得其
|
|||||||
## gpio_free_array()
|
## gpio_free_array()
|
||||||
|
|
||||||
gpio_free()
|
gpio_free()
|
||||||
gpio_set_debounce()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -226,7 +226,6 @@ GPIO 值的命令需要等待其信息排到隊首才發送命令,再獲得其
|
|||||||
## gpio_free_array()
|
## gpio_free_array()
|
||||||
|
|
||||||
gpio_free()
|
gpio_free()
|
||||||
gpio_set_debounce()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_gpio.h>
|
#include <linux/of_gpio.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
|
#include <linux/gpio/consumer.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/spi/ads7846.h>
|
#include <linux/spi/ads7846.h>
|
||||||
@ -1012,7 +1013,7 @@ static int ads7846_setup_pendown(struct spi_device *spi,
|
|||||||
ts->gpio_pendown = pdata->gpio_pendown;
|
ts->gpio_pendown = pdata->gpio_pendown;
|
||||||
|
|
||||||
if (pdata->gpio_pendown_debounce)
|
if (pdata->gpio_pendown_debounce)
|
||||||
gpio_set_debounce(pdata->gpio_pendown,
|
gpiod_set_debounce(gpio_to_desc(ts->gpio_pendown),
|
||||||
pdata->gpio_pendown_debounce);
|
pdata->gpio_pendown_debounce);
|
||||||
} else {
|
} else {
|
||||||
dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n");
|
dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n");
|
||||||
|
@ -100,11 +100,6 @@ static inline int gpio_direction_output(unsigned gpio, int value)
|
|||||||
return gpiod_direction_output_raw(gpio_to_desc(gpio), value);
|
return gpiod_direction_output_raw(gpio_to_desc(gpio), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int gpio_set_debounce(unsigned gpio, unsigned debounce)
|
|
||||||
{
|
|
||||||
return gpiod_set_debounce(gpio_to_desc(gpio), debounce);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int gpio_get_value_cansleep(unsigned gpio)
|
static inline int gpio_get_value_cansleep(unsigned gpio)
|
||||||
{
|
{
|
||||||
return gpiod_get_raw_value_cansleep(gpio_to_desc(gpio));
|
return gpiod_get_raw_value_cansleep(gpio_to_desc(gpio));
|
||||||
@ -214,11 +209,6 @@ static inline int gpio_direction_output(unsigned gpio, int value)
|
|||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int gpio_set_debounce(unsigned gpio, unsigned debounce)
|
|
||||||
{
|
|
||||||
return -ENOSYS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int gpio_get_value(unsigned gpio)
|
static inline int gpio_get_value(unsigned gpio)
|
||||||
{
|
{
|
||||||
/* GPIO can never have been requested or set as {in,out}put */
|
/* GPIO can never have been requested or set as {in,out}put */
|
||||||
|
Reference in New Issue
Block a user