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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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