[PATCH linux dev-5.10 06/35] ARM: dts: aspeed: rainier: Add leds that are off PCA9552

Joel Stanley joel at jms.id.au
Thu Mar 25 10:43:16 AEDT 2021


On Fri, 12 Mar 2021 at 07:05, vishwanatha subbanna
<vishwa at linux.vnet.ibm.com> wrote:
>
>
>
> On 12-Mar-2021, at 6:00 AM, Joel Stanley <joel at jms.id.au> wrote:
>
> On Fri, 12 Mar 2021 at 00:21, Milton Miller II <miltonm at us.ibm.com> wrote:
>
>
>
>
> -----"openbmc" <openbmc-bounces+miltonm=us.ibm.com at lists.ozlabs.org> wrote: -----
>
> To: Eddie James <eajames at linux.ibm.com>
> From: Joel Stanley
> Sent by: "openbmc"
> Date: 03/11/2021 06:09PM
> Cc: OpenBMC Maillist <openbmc at lists.ozlabs.org>
> Subject: [EXTERNAL] Re: [PATCH linux dev-5.10 06/35] ARM: dts:
> aspeed: rainier: Add leds that are off PCA9552
>
> On Mon, 8 Mar 2021 at 22:54, Eddie James <eajames at linux.ibm.com>
> wrote:
>
>
> From: Vishwanatha Subbanna <vishwa at linux.vnet.ibm.com>
>
> These LEDs are on the fans and are connected via a
> pca9551 i2c expander
>
>
> This change doesn't make sense. The pca9551 is an i2c LED expander,
> so
> we don't need to expose the pins as GPIOs and then attach a gpio-leds
> driver to them. We should instead simply configure the pca955x driver
> to drive the LEDs as LEDs.
>
>
> I'll refresh your memory on why we have been doing this in our
> devie trees and then let you consider if this is desired or not.
>
> The led system insistes on creating a compact map (no holes) (as
> does the reset subsystem).
>
> However, this means the relative led number for a pin changes
> as the prior pins change from gpio to led configuration.
>
> For example if pins 2 and 7 are leds, they become leds 0 and 1.
> Changing pin 5 to also be an led means that pin 7 is now led 2
> not led 1 on the led subsystem.
>
>
> Thanks for the rationale reminder.
>
> Are these led numbers important to userspace, or does the renumbering
> affect device tree changes only?
>
>
>
> Here are my technical needs.
> - I need these LEDs associated with names and this __must not__ change
> - I need those LEDs represented as `/sys/class/leds/<$name>`
>
> What can I do :
> - use `leds-gpio` like how it’s done today
>
> OR
>
> - Use “label” in PCA955X_TYPE_LED
>    - However, putting this label, it results in `/sys/class/leds/pca955x:<$label>`. As opposed to `/sys/class/leds/<$label>`.
>
> Is there a way where I can get `/sys/class/leds/<$label>` ?. I did not get this from the documentation. Seeing pca955x on 100 entries seems a noise

The prefix has been present in the driver since it was introduced in
2008. Is there any reason we can't have userspace ignore the pca955x
prefix?

Cheers,

Joel


More information about the openbmc mailing list