Multi-led configuration in dts

Velumani T-ERS,HCLTech velumanit at hcl.com
Thu Mar 31 03:04:28 AEDT 2022


Classification: Public

Thanks for your response. There are two ways to get this done.
1. bring support in phosphor-led-sysfs for defining multi-color and use them in the application
2. Add support in multi-color led driver framework.
@Alexander @Andres Jefery Please provide your suggestions. We may be using this in multiple platforms. We can plan for the implementation.

Regards,
Velu

-----Original Message-----
From: Alexander A. Filippov <a.filippov at yadro.com>
Sent: Thursday, March 24, 2022 7:12 PM
To: sri d <srid.11486 at gmail.com>
Cc: openbmc at lists.ozlabs.org; spinler at us.ibm.com; andrew at aj.id.au; bradleyb at fuzziesquirrel.com; Velumani T-ERS,HCLTech <velumanit at hcl.com>
Subject: Re: Multi-led configuration in dts

[CAUTION: This Email is from outside the Organization. Unless you trust the sender, Don't click links or open attachments as it may be a Phishing email, which can steal your Information and compromise your Computer.]

On Thu, Mar 24, 2022 at 06:26:07PM +0530, sri d wrote:
>
> Hi Team,
>
> I am working on implementing Power and system identification LEDs, in which LEDs are connected to GPIO pins directly. I need to handle two colors (blue & yellow) for LEDs in *.dts file.
> In phosphor-led-sysfs repo, whether multi-led configuration is handled
> ?
> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Ftorvalds%2Flinux%2Fblob%2Fmaster%2FDocumentation%2Fdevicetree
> %2Fbindings%2Fleds%2Fleds-class-multicolor.yaml&data=04%7C01%7Cvel
> umanit%40hcl.com%7C6e6ac0bef1cd4f6b11e308da0d9c2064%7C189de737c93a4f5a
> 8b686f4ca9941912%7C0%7C0%7C637837261456946008%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3
> 000&sdata=TnjigzS2VvhsqrJk%2Bp9UkXxi7aozqbfgdITZQpK7uxQ%3D&res
> erved=0
>

You could define them as two standalone LED and manage them separately.
It works fine even for a paired LED until you want to synchronized switching (for example: the blinking of mixed color).


> As far as I analyzed, multi-led seems to work for dedicated LED controllers and not for GPIO pins directly. Is there a way we can make it work for directly connected GPIOs ?
> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> phoronix.com%2Fscan.php%3Fpage%3Dnews_item%26px%3DLinux-5.9-Multi-Colo
> r-LEDs&data=04%7C01%7Cvelumanit%40hcl.com%7C6e6ac0bef1cd4f6b11e308
> da0d9c2064%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C63783726145694
> 6008%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBT
> iI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=JyoXl7fN6eYe6G5optiYYPkYoAJ
> bRXByJufEgN%2F3hiI%3D&reserved=0
>

The multi-color LEDs are not supported by the gpio-led driver yet.

We have a desire to implement multi-color LED support in gpio-led driver, but it's a low priority task and I can't tell when it will be done. :)

> Thanks,
> Jayashree

--
Cheers,
Alexander
::DISCLAIMER::
________________________________
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
________________________________


More information about the openbmc mailing list