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

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

 



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?
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux