mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
gpio: rockchip: Sync with upstream
Signed-off-by: Tao Huang <huangtao@rock-chips.com> Change-Id: I49a33907327f3c08d613d9c463cd9abaac8dcd92
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/gpio/driver.h>
|
||||
#include <linux/init.h>
|
||||
@@ -16,8 +17,8 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pinctrl/pinconf-generic.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
@@ -274,10 +275,10 @@ static int rockchip_gpio_set_config(struct gpio_chip *gc, unsigned int offset,
|
||||
{
|
||||
enum pin_config_param param = pinconf_to_config_param(config);
|
||||
unsigned int debounce = pinconf_to_config_argument(config);
|
||||
int ret = 0;
|
||||
|
||||
switch (param) {
|
||||
case PIN_CONFIG_INPUT_DEBOUNCE:
|
||||
rockchip_gpio_set_debounce(gc, offset, debounce);
|
||||
/*
|
||||
* Rockchip's gpio could only support up to one period
|
||||
* of the debounce clock(pclk), which is far away from
|
||||
@@ -289,15 +290,10 @@ static int rockchip_gpio_set_config(struct gpio_chip *gc, unsigned int offset,
|
||||
* still return -ENOTSUPP as before, to make sure the caller
|
||||
* of gpiod_set_debounce won't change its behaviour.
|
||||
*/
|
||||
rockchip_gpio_set_debounce(gc, offset, debounce);
|
||||
ret = -ENOTSUPP;
|
||||
break;
|
||||
return -ENOTSUPP;
|
||||
default:
|
||||
ret = -ENOTSUPP;
|
||||
break;
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user