summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authortitron <tiezhuang.dong.yh@renesas.com>2019-07-22 17:45:37 +0800
committerMarek Vasut <marex@denx.de>2019-07-29 13:38:55 +0200
commitb5f563e588d134b2cb96a2f54332b7727ee4cdad (patch)
treef0aba293336df2d15414b51408b49c4eefbf4fb6 /drivers/pinctrl
parent89c00f009ca8107d80834513877bc4ddd0ab2f5b (diff)
downloadu-boot-b5f563e588d134b2cb96a2f54332b7727ee4cdad.tar.gz
pinctrl: renesas: fix R-Car gpio0_00 operation fails with 'gpio -input' command
Fix GPIO bank 0 pin 0 request/release off by one error. Without this patch, it is not possible to request/release GPIO bank 0 pin 0. Signed-off-by: Tiezhuang Dong <tiezhuang.dong.yh@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Eugeniu Rosca <roscaeugeniu@gmail.com> Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/renesas/pfc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index d1271dad44..f2973bebef 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -469,7 +469,7 @@ static int sh_pfc_gpio_request_enable(struct udevice *dev,
const struct sh_pfc_pin *pin = NULL;
int i, ret, idx;
- for (i = 1; i < pfc->info->nr_pins; i++) {
+ for (i = 0; i < pfc->info->nr_pins; i++) {
if (priv->pfc.info->pins[i].pin != pin_selector)
continue;
@@ -505,7 +505,7 @@ static int sh_pfc_gpio_disable_free(struct udevice *dev,
const struct sh_pfc_pin *pin = NULL;
int i, idx;
- for (i = 1; i < pfc->info->nr_pins; i++) {
+ for (i = 0; i < pfc->info->nr_pins; i++) {
if (priv->pfc.info->pins[i].pin != pin_selector)
continue;