On Wed, Dec 26, 2018 at 7:46 AM Yoshihiro Shimoda
<[email protected]> wrote:
> > From: Geert Uytterhoeven, Sent: Thursday, December 20, 2018 11:03 PM
> >
> > From: Takeshi Kihara <[email protected]>
> >
> > MOD_SEL register bit numbering was different from R-Car E3 SoC and
> > R-Car H3/M3-[WN] SoCs.
> >
> > MOD_SEL 1-bit H3/M3-[WN] E3
> > =============== ========== =====
> > Set Value = H'0 b'0 b'0
> > Set Value = H'1 b'1 b'1
> >
> > MOD_SEL 2-bits H3/M3-[WN] E3
> > =============== ========== =====
> > Set Value = H'0 b'00 b'00
> > Set Value = H'1 b'01 b'10
> > Set Value = H'2 b'10 b'01
> > Set Value = H'3 b'11 b'11
> >
> > MOD_SEL 3-bits H3/M3-[WN] E3
> > =============== ========== =====
> > Set Value = H'0 b'000 b'000
> > Set Value = H'1 b'001 b'100
> > Set Value = H'2 b'010 b'010
> > Set Value = H'3 b'011 b'110
> > Set Value = H'4 b'100 b'001
> > Set Value = H'5 b'101 b'101
> > Set Value = H'6 b'110 b'011
> > Set Value = H'7 b'111 b'111
> >
> > This patch replaces the #define name and value of MOD_SEL.
> >
> > Signed-off-by: Takeshi Kihara <[email protected]>
> > Fixes: 6d4036a1e3b3 ("pinctrl: sh-pfc: Initial R8A77990 PFC support")
> > [shimoda: Split a patch per SoC and revise the commit log]
> > Signed-off-by: Yoshihiro Shimoda <[email protected]>
> > [geert: Use macros to do the actual reordering]
> > Signed-off-by: Geert Uytterhoeven <[email protected]>
> > ---
> > Using a macro makes the code easier to writ, read, and maintain.
> > Use "git show --color-words" to see the difference.
> >
> > I'd love to handle the reversal in the PINMUX_CFG_REG_VAR()
> > descriptions, but I can't use e.g. REV8(MOD_SEL0_19_18_17) there, as
> > MOD_SEL0_19_18_17 is a single parameter, not 8 parameters.
> >
> > Can this be improved?
>
> Thank you for updating the patch to use the macros!
> I think this patch can improve readability.
>
> So,
>
> Reviewed-by: Yoshihiro Shimoda <[email protected]>
Thanks, queuing in sh-pfc-for-v5.1.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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