Message ID | 1502281187-24068-9-git-send-email-yoshihiro.shimoda.uh@renesas.com |
---|---|
State | New |
Headers | show |
On Wed, Aug 9, 2017 at 2:19 PM, Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> wrote: > From: Takeshi Kihara <takeshi.kihara.df@renesas.com> > > Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> i.e. will queue in sh-pfc-for-v4.14. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c index f8f71b6..f806560 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c @@ -23,7 +23,7 @@ PORT_GP_9(0, fn, sfx), \ PORT_GP_32(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \ - PORT_GP_10(3, fn, sfx), \ + PORT_GP_CFG_10(3, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \ PORT_GP_32(4, fn, sfx), \ PORT_GP_21(5, fn, sfx), \ PORT_GP_14(6, fn, sfx) @@ -1968,8 +1968,25 @@ enum { { }, }; +static int r8a77995_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *pocctrl) +{ + int bit = -EINVAL; + + *pocctrl = 0xe6060380; + + if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 9)) + bit = 29 - (pin - RCAR_GP_PIN(3, 0)); + + return bit; +} + +static const struct sh_pfc_soc_operations r8a77995_pinmux_ops = { + .pin_to_pocctrl = r8a77995_pin_to_pocctrl, +}; + const struct sh_pfc_soc_info r8a77995_pinmux_info = { .name = "r8a77995_pfc", + .ops = &r8a77995_pinmux_ops, .unlock_reg = 0xe6060000, /* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },