Re: [PATCH] pinctrl: sh-pfc: r8a77970: remove SH_PFC_PIN_CFG_DRIVE_STRENGTH flag

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

 



Hi Geert,

Thanks for your feedback.

On 2018-07-02 15:03:02 +0200, Geert Uytterhoeven wrote:
> CC Sergei,
> 
> Thanks for your patch!
> 
> On Mon, Jul 2, 2018 at 10:06 AM Niklas Söderlund
> <niklas.soderlund+renesas@xxxxxxxxxxxx> wrote:
> > The datasheet do not document any registers to control drive strength,
> 
> does
> 
> > and no drive strength registers are for this reason described for this
> > SoC. The flag indicating that drive strength can be controlled are
> 
> flags
> 
> > however set for some pins in the driver.
> >
> > This leads to a NULL pointer dereference when the sh-pfc core tries to
> > access the struct describing the drive strength registers, for example
> > when reading the sysfs file pinconf-pins.
> >
> > Fix this by removing the SH_PFC_PIN_CFG_DRIVE_STRENGTH from all pins.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> 
> I'll wait a bit for Sergei's response.
> Perhaps his version of the datasheet does document drive strength registers?

Do you wish for a v2 addressing the spelling above or can you fix that 
when applying?

> 
> > --- a/drivers/pinctrl/sh-pfc/pfc-r8a77970.c
> > +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77970.c
> > @@ -21,15 +21,13 @@
> >  #include "core.h"
> >  #include "sh_pfc.h"
> >
> > -#define CFG_FLAGS SH_PFC_PIN_CFG_DRIVE_STRENGTH
> > -
> >  #define CPU_ALL_PORT(fn, sfx)                                          \
> > -       PORT_GP_CFG_22(0, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE), \
> > -       PORT_GP_CFG_28(1, fn, sfx, CFG_FLAGS),                          \
> > -       PORT_GP_CFG_17(2, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE), \
> > -       PORT_GP_CFG_17(3, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE), \
> > -       PORT_GP_CFG_6(4,  fn, sfx, CFG_FLAGS),                          \
> > -       PORT_GP_CFG_15(5, fn, sfx, CFG_FLAGS)
> > +       PORT_GP_CFG_22(0, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE),          \
> > +       PORT_GP_28(1, fn, sfx),                                         \
> > +       PORT_GP_CFG_17(2, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE),          \
> > +       PORT_GP_CFG_17(3, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE),          \
> > +       PORT_GP_6(4,  fn, sfx),                                         \
> > +       PORT_GP_15(5, fn, sfx)
> >  /*
> >   * F_() : just information
> >   * FM() : macro for FN_xxx / xxx_MARK
> 
> 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

-- 
Regards,
Niklas Söderlund



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux