Re: [PATCH 2/4] pinctrl: sh-pfc: r8a77470: Add SDHI2 voltage switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 22, 2018 at 8:44 PM Wolfram Sang <wsa@xxxxxxxxxxxxx> wrote:
> On Fri, Sep 21, 2018 at 12:55:09PM +0100, Fabrizio Castro wrote:
> > Add SH_PFC_PIN_CFG_IO_VOLTAGE definition for the SDHI2 pins
> > capable of switching voltage. Please note that with the
> > RZ/G1C only 1 bit of the POC Control Register is used to
> > control each interface.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx>
> > Reviewed-by: Biju Das <biju.das@xxxxxxxxxxxxxx>
>
> In general:
>
> Acked-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
>
> > +     if (_bank == 4 && _pin >= 14 && _pin <= 19)
> > +             return 1;
> > +
> > +     return -EINVAL;
>
> I'd like a tad better to bail out on the error case and have the main
> path returning on the good case, but no strong opinion...

And we have these nice RCAR_GP_PIN() macros to check pin ranges.
Please have a look at the flow in e.g. r8a7795_pin_to_pocctrl().

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux