Re: [PATCH 07/11] pinctrl: use ngpios propety from DT

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

 




On Mon, Oct 19, 2015 at 7:43 AM, Pramod Kumar <pramodku@xxxxxxxxxxxx> wrote:

> Since identical hardware is used in several instances and all pins
> are not routed to pinctrl hence getting total number of gpios from
> DT make more sense hence stop using total number of gpios pins from
> drivers and extract it from DT.
>
> Signed-off-by: Pramod Kumar <pramodku@xxxxxxxxxxxx>
> Reviewed-by: Ray Jui <rjui@xxxxxxxxxxxx>
> Reviewed-by: Scott Branden <sbranden@xxxxxxxxxxxx>

This patch is wrong.

Keep this per-compatible code, and only overrid the ngpios
if and only if:

- The ngpios is set in the DT node
- The ngpios in the DT node is *smaller* than the hardware
  defined number of GPIOs.

ngpios is for restricting the number of available lines due to
routing etc, not to define what the hardware has, because the
hardware most certainly have all the lines, it's just that you're
not using all of them.

Yours,
Linus Walleij
--
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