Physical LED Design Proposal

Jayashree D srid.11486 at gmail.com
Fri May 27 17:12:45 AEST 2022


Hi Team,

Problem Description :

In the existing phosphor-led-sysfs design, it exposes one service per LED.
Therefore, multiple services will be created for multiple GPIO pins
configured for LED. To abstract this method and also to create LEDs under a
single service, a new implementation is proposed.

Existing Implementation :

1. Physical Leds are defined in the device tree under "leds" section.
2. Corresponding GPIO pin are defined for the physical LEDs.
3. "udev rules" are used to monitor the physical LEDs.
4. Once the LED in initialized in device tree, udev event will be created
and it will trigger a systemd service for that LED.
5. Therefore, if multiple GPIO pins are configured for LEDs, then it will
create a multiple systemd services
(xyz.openbmc_project.led.controller at .service)
for phosphor-led-sysfs based on the LED name.

Example :

busctl tree xyz.openbmc_project.LED.Controller.led1
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/led
      `-/xyz/openbmc_project/led/physical
        `-/xyz/openbmc_project/led/physical/led1

busctl tree xyz.openbmc_project.LED.Controller.led2
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/led
      `-/xyz/openbmc_project/led/physical
        `-/xyz/openbmc_project/led/physical/led2



New Implementation :

1. Physical Leds are defined in the device tree under "leds" section.
2. Corresponding GPIO pin are defined for the physical LEDs.
3. "udev rules" are used to monitor the physical LEDs.
4. Once the udev event is initialized for the LED, it will store those LED
name using the script in udev instead of triggering systemd   service.
5. Phosphor-led-sysfs will have a single systemd service
(xyz.openbmc_project.led.controller.service) running by default at system
startup.
6. A dbus method call will be exposed from the service. udev will notify
the LEDs detected in the driver.

Example :

busctl tree xyz.openbmc_project.LED.Controller
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/led
      `-/xyz/openbmc_project/led/physical
        `-/xyz/openbmc_project/led/physical/led1
        `-/xyz/openbmc_project/led/physical/led2


This was already discussed in the previous mail thread. Please refer to the
below link.
https://lists.ozlabs.org/pipermail/openbmc/2022-April/030272.html

Please provide your suggestions on this new proposal.


Thanks
Jayashree
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220527/5faf72aa/attachment.htm>


More information about the openbmc mailing list