[PATCH v2 2/4] pinctrl: Add NVIDIA Tegra XUSB pad controller support

Thierry Reding thierry.reding at gmail.com
Thu Jun 12 00:22:21 PDT 2014


On Wed, Jun 11, 2014 at 01:23:59PM -0700, Andrew Bresticker wrote:
> On Tue, Jun 10, 2014 at 4:11 AM, Thierry Reding <thierry.reding at gmail.com> wrote:
[...]
> > +static int tegra_xusb_padctl_pinconf_group_set(struct pinctrl_dev *pinctrl,
> > +                                              unsigned int group,
> > +                                              unsigned long *configs,
> > +                                              unsigned int num_configs)
> > +{
> > +       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
> > +       const struct tegra_xusb_padctl_lane *lane;
> > +       enum tegra_xusb_padctl_param param;
> > +       unsigned int i;
> > +       u32 value;
> > +
> > +       lane = &padctl->soc->lanes[group];
> > +
> > +       for (i = 0; i < num_configs; i++) {
> > +               param = TEGRA_XUSB_PADCTL_UNPACK_PARAM(configs[i]);
> > +               value = TEGRA_XUSB_PADCTL_UNPACK_VALUE(configs[i]);
> > +
> > +               switch (param) {
> > +               case TEGRA_XUSB_PADCTL_IDDQ:
> > +                       value = padctl_readl(padctl, lane->offset);
> 
> This overwrites the configuration value - probably want to use a
> separate variable for the register value.

Good catch, thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140612/8e8deb93/attachment.sig>


More information about the linux-arm-kernel mailing list