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