gpio: rockchip: Sync with upstream

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I49a33907327f3c08d613d9c463cd9abaac8dcd92
This commit is contained in:
Tao Huang
2023-02-08 19:32:41 +08:00
parent bc249ee6f7
commit 7558c3e935

View File

@@ -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;
}
/*