Re: [PATCH 07/11] pinctrl: use ngpios propety from DT
From: Linus Walleij
Date: Tue Oct 27 2015 - 05:52:06 EST
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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/