From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19506C433EF for ; Wed, 8 Jun 2022 14:13:51 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LJ8NG1cxyz3bmw for ; Thu, 9 Jun 2022 00:13:50 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=HHF4hd6U; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::b2c; helo=mail-yb1-xb2c.google.com; envelope-from=srid.11486@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=HHF4hd6U; dkim-atps=neutral Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4LJ8MV2w33z308m for ; Thu, 9 Jun 2022 00:13:09 +1000 (AEST) Received: by mail-yb1-xb2c.google.com with SMTP id y188so7253485ybe.11 for ; Wed, 08 Jun 2022 07:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MtD90tjlD5CCTQ4eNRKuGdKWlmVAa9Ps4OOl7mjTutA=; b=HHF4hd6URLzUWO8+ov7p4EJuap2C7/Z9tM5Ii4XdONbRdqLN3V/IGcWl2qkqfXvaZ3 2Ln4bnzxjXO8cZNnZyIuceLp7rp3azQNPk2HdK0Deh9xgySMIOExUfYv48MfseLvE6fh YkO5ZS214W0Vb1y9UOCdP+rp7C0Mr/m5kayYnsE+lT5oVqeSAMAFhNX5EqF37OfZRcbb MQC8tatpIFBGOpOfFdTgK1o4pbHYFKemoXeRJvd9bwl4IEdxjXmzIobJUG2bGrdWHAOJ zK5RebpXm1ggdgXA2kE0+9tf8EMHz9v2HOjE35OGkuhPQjh9Xap0xInp8MAlPysOXi4P pkdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MtD90tjlD5CCTQ4eNRKuGdKWlmVAa9Ps4OOl7mjTutA=; b=fZgA/im+HXsWTtLCkDcZt0y0EI+l9ftallZMVtqCPTACrNgEqpcUjB21HCWgKbqBXM Cg30q/PTGR35Y2bJD4nHFEBkHoSF6/+1teLXoK5K/Vow930xxhhvoAA0o7TsKsvDYfbo TJGhFUBA2e0pVXXREjijuoemrpRXrzPA47sdSosWnZzuih9SsYCAx3uwNdnpq3dRBr1y pDjv1lucUFdcJRFx9vO4kqxZSjY8KWSdObfWYEKxWe333ZDYey3Sd3emWrmBbde06UvN GI9A5OUpXdMuv2LLJJzplERb038bFRuYpRVvKwC0wQAhzLpDJEJpIS5Nw2v1vXL13BRd Ee9Q== X-Gm-Message-State: AOAM532j9AnTEeknE73FRKyAw4kvnQoPkLabTJ28jqAKjLEjOu7WGg61 9Ry3xfKQH1XrBn5M/xeRpCQY4et+K3O8funFogs= X-Google-Smtp-Source: ABdhPJwxH8I+IRzIMK1vG+atPzdULVC2wYP/jNyNVPKxwZYL8Moup3RY/NS1Vm+vpCrEv3Dpv1qLFpzl/xZj0m4SWhU= X-Received: by 2002:a25:f506:0:b0:64d:f8a5:b2bd with SMTP id a6-20020a25f506000000b0064df8a5b2bdmr32901659ybe.610.1654697585984; Wed, 08 Jun 2022 07:13:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jayashree D Date: Wed, 8 Jun 2022 19:42:54 +0530 Message-ID: Subject: Re: Physical LED Design Proposal To: Ed Tanous Content-Type: multipart/alternative; boundary="000000000000d2c7d805e0f04d34" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: spinler@us.ibm.com, andrew@aj.id.au, openbmc@lists.ozlabs.org, jayashree-d@hcl.com, bradleyb@fuzziesquirrel.com, velumanit@hcl.com Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" --000000000000d2c7d805e0f04d34 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 7, 2022 at 9:41 PM Ed Tanous wrote: > On Tue, Jun 7, 2022 at 12:07 AM Jayashree D wrote: > > > > Hi Team, > > > > Could you please provide your suggestions on the above design for LED. > > > > Thanks, > > Jayashree > > > > > > On Fri, May 27, 2022 at 12:42 PM Jayashree D > wrote: > >> > >> 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. > > You've kind of jumped directly to a solution without spending any > details on why this design is necessary. What are you trying to > achieve? Why does the existing solution not work? You allude to > multiple services being bad, but you don't really state why, or what's > preventing that from working. This is a section labeled problem > description, it needs to describe the problem, ideally in much more > length than your solution itself. > > The Yosemite V2 Platform combines a Power LED and a System Identificatio= n LED into a single bicolor blue-yellow LED per host. A total of 4 =C3=97 LEDs will be placed along the front edge of the board i= n a grid. The grid will be 2=C3=97rows of 2 =C3=97 LEDs to match the layout of the ca= rd slots. Based on each host status, blue or yellow led needs to be blink, OFF or ON. Therefore, bi-color led needs to be paired as a group and exposed in the userspace. Based on the existing implementation in phopshor-led-sysfs, pairing groups will be difficult, since it exposes one service per LED. Therefore, refactoring the phosphor-led-sysfs repo to run under a single service and pair a group of LED which represents each host. >> > >> 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.controll= er@.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 t= o > the below link. > >> https://lists.ozlabs.org/pipermail/openbmc/2022-April/030272.html > >> > >> Please provide your suggestions on this new proposal. > >> > >> > >> Thanks > >> Jayashree > --000000000000d2c7d805e0f04d34 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Jun 7, 2022 at 9:41 PM Ed Tan= ous <edtanous@google.com> = wrote:
On Tue, J= un 7, 2022 at 12:07 AM Jayashree D <srid.11486@gmail.com> wrote:
>
> Hi Team,
>
> Could you please provide your suggestions on the above design for LED.=
>
> Thanks,
> Jayashree
>
>
> On Fri, May 27, 2022 at 12:42 PM Jayashree D <srid.11486@gmail.com> wrote: >>
>> 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 pin= s configured for LED. To abstract this method and also to create LEDs under= a single service, a new implementation is proposed.

You've kind of jumped directly to a solution without spending any
details on why this design is necessary.=C2=A0 What are you trying to
achieve?=C2=A0 Why does the existing solution not work?=C2=A0 You allude to=
multiple services being bad, but you don't really state why, or what= 9;s
preventing that from working.=C2=A0 This is a section labeled problem
description, it needs to describe the problem, ideally in much more
length than your solution itself.

=C2=A0The Yosemite V2 Platform combines a Power LED a= nd a System Identification LED into a single bicolor blue-yellow LED per ho= st.
A total of 4 =C3=97 LEDs will be placed along the front edge of the= board in a grid.
The grid will be 2=C3=97rows of 2 =C3=97 LEDs to matc= h the layout of the card slots.

Based on each host status, blue or y= ellow led needs to be blink, OFF or ON. Therefore, bi-color led needs to be= paired as a group and exposed in the userspace.

<= div>Based on the existing implementation in phopshor-led-sysfs, pairing gro= ups will be difficult, since it exposes one service per LED.

Theref= ore, refactoring the phosphor-led-sysfs repo to run under a single service = and pair a group of LED which represents each host.

>>
>> Existing Implementation :
>>
>> 1. Physical Leds are defined in the device tree under "leds&q= uot; 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.control= ler@.service) for phosphor-led-sysfs based on the LED name.
>>
>> Example :
>>
>> busctl tree xyz.openbmc_project.LED.Controller.led1
>> `-/xyz
>>=C2=A0 =C2=A0`-/xyz/openbmc_project
>>=C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led/physical
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led/physic= al/led1
>>
>> busctl tree xyz.openbmc_project.LED.Controller.led2
>> `-/xyz
>>=C2=A0 =C2=A0`-/xyz/openbmc_project
>>=C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led/physical
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led/physic= al/led2
>>
>>
>>
>> New Implementation :
>>
>> 1. Physical Leds are defined in the device tree under "leds&q= uot; 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 t= hose LED name using the script in udev instead of triggering systemd=C2=A0 = =C2=A0service.
>> 5. Phosphor-led-sysfs will have a single systemd service (xyz.open= bmc_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
>>=C2=A0 =C2=A0`-/xyz/openbmc_project
>>=C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led/physical
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led/physic= al/led1
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`-/xyz/openbmc_project/led/physic= al/led2
>>
>>
>> This was already discussed in the previous mail thread. Please ref= er to the below link.
>> https://lists.ozlabs.org/p= ipermail/openbmc/2022-April/030272.html
>>
>> Please provide your suggestions on this new proposal.
>>
>>
>> Thanks
>> Jayashree
--000000000000d2c7d805e0f04d34--