[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfzFh4Tp5-P-p-6=Oafd=xhQAL5i=XC5PUXedd-fVWz_g@mail.gmail.com>
Date: Tue, 21 Sep 2021 15:10:18 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Andrew Jeffery <andrew@...id.au>
Cc: linux-leds@...r.kernel.org, linux-gpio@...r.kernel.org,
clg@...d.org, robh+dt@...nel.org, joel@....id.au, pavel@....cz,
linus.walleij@...aro.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-aspeed@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] leds: pca955x: Expose GPIOs for all pins
On Tue, Sep 21, 2021 at 7:39 AM Andrew Jeffery <andrew@...id.au> wrote:
>
> Hello,
>
> This is a rework of a Rube Goldberg-inspired RFC I posted previously:
>
> https://lore.kernel.org/lkml/20210723075858.376378-1-andrew@aj.id.au/
>
> This time around there's a lot less Rube - the series:
>
> 1. Contains no (ab)use of pinctrl
> 2. Always exposes all pins as GPIOs
> 3. Internally tracks the active pins
Thanks for the rework! Briefly looking it looks very nice to me, hence, FWIW,
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Without these patches the driver limits the number of pins exposed on
> the gpiochip to the number of pins specified as GPIO in the devicetree,
> but doesn't map between the GPIO and pin number spaces. The result is
> that specifying offset or interleaved GPIOs in the devicetree gives
> unexpected behaviour in userspace.
>
> By always exposing all pins as GPIOs the patches resolve the lack of
> mapping between GPIO offsets and pins on the package in the driver by
> ensuring we always have a 1-to-1 mapping.
>
> The issue is primarily addressed by patch 1/2. Patch 2/2 makes it
> possible to not expose any pins as LEDs (and therefore make them all
> accessible as GPIOs). This has a follow-on effect of allowing the driver
> to bind to a device instantiated at runtime without requiring a
> description in the devicetree.
>
> I've tested the series under qemu to inspect the various interactions
> between LEDs vs GPIOs as well as conflicting GPIO requests.
>
> Please review!
>
> Andrew
>
> Andrew Jeffery (2):
> leds: pca955x: Make the gpiochip always expose all pins
> leds: pca955x: Allow zero LEDs to be specified
>
> drivers/leds/leds-pca955x.c | 65 +++++++++++++++++++------------------
> 1 file changed, 34 insertions(+), 31 deletions(-)
>
>
> base-commit: 239f32b4f161c1584cd4b386d6ab8766432a6ede
> --
> 2.30.2
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists