public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: mperttunen@nvidia•com (Mikko Perttunen)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v4 2/4] pinctrl: Add NVIDIA Tegra XUSB pad controller support
Date: Wed, 18 Jun 2014 12:53:31 +0300	[thread overview]
Message-ID: <53A1619B.8080806@nvidia.com> (raw)
In-Reply-To: <1403006877-19850-2-git-send-email-thierry.reding@gmail.com>

On 17/06/14 15:07, Thierry Reding wrote:
> +static int tegra_xusb_padctl_pinconf_group_get(struct pinctrl_dev *pinctrl,
> +                                              unsigned int group,
> +                                              unsigned long *config)
> +{
> +       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
> +       const struct tegra_xusb_padctl_lane *lane;
> +       enum tegra_xusb_padctl_param param;
> +       u32 value;
> +
> +       param = TEGRA_XUSB_PADCTL_UNPACK_PARAM(*config);
> +       lane = &padctl->soc->lanes[group];
> +
> +       switch (param) {
> +       case TEGRA_XUSB_PADCTL_IDDQ:
> +               value = padctl_readl(padctl, lane->offset);
> +               value = (value >> lane->iddq) & 0x1;
> +               *config = TEGRA_XUSB_PADCTL_PACK(param, value);
> +               break;
> +
> +       default:
> +               dev_err(padctl->dev, "invalid configuration parameter: %04x\n",
> +                       param);
> +               return -ENOTSUPP;
> +       }
> +
> +       return 0;
> +}

I guess `value' should also be negated here?

  reply	other threads:[~2014-06-18  9:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 12:07 [PATCH v4 1/4] of: Add NVIDIA Tegra XUSB pad controller binding Thierry Reding
2014-06-17 12:07 ` [PATCH v4 2/4] pinctrl: Add NVIDIA Tegra XUSB pad controller support Thierry Reding
2014-06-18  9:53   ` Mikko Perttunen [this message]
2014-06-17 12:07 ` [PATCH v4 3/4] ARM: tegra: tegra124: Add XUSB pad controller Thierry Reding
2014-06-17 12:07 ` [PATCH v4 4/4] ARM: tegra: jetson-tk1: " Thierry Reding
2014-06-17 16:24 ` [PATCH v4 1/4] of: Add NVIDIA Tegra XUSB pad controller binding Stephen Warren
2014-06-18 10:07   ` Mikko Perttunen
2014-06-19 11:39     ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A1619B.8080806@nvidia.com \
    --to=mperttunen@nvidia$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox