mbox series

[v3,0/7] Standardize onboard LED support for 96Boards

Message ID 20181029094245.7886-1-manivannan.sadhasivam@linaro.org
Headers show
Series Standardize onboard LED support for 96Boards | expand

Message

Manivannan Sadhasivam Oct. 29, 2018, 9:42 a.m. UTC
This patchset standardizes the onboard LEDs on 96Boards by maintaining
common labels and triggers as below:

green:user1  default-trigger: heartbeat
green:user2  default-trigger: mmc0/disk-activity (onboard-storage)
green:user3  default-trigger: mmc1 (SD card)
green:user4  default-trigger: none, panic-indicator
yellow:wlan  default-trigger: phy0tx
blue:bt      default-trigger: hci0-power

This standardization is required to provide a common behaviour of LEDs
across all mainline supported 96Boards and also making it easier to
control it using an userspace library like MRAA.

For Rock960 and Ficus boards, the LED support is added in this patchset.
Rest of the boards are converted to adopt the standard.

Note: Since there is no UFS trigger available for now, user2 LED trigger
is set to none on HiKey960.

Thanks,
Mani

Changes in v3:

* Added missing Signed-off-by tag for APQ8016 patch
* Added Acked-by from Amit
* Fixed user LED node names for HiKey board

Changes in v2:

* Removed device-name from LED labels as per the suggestion from Simon
  and Pavel
* Adopted APQ8016 SBC (Dragonboard410c)
* Tested the Ficus patch on Ficus V1.1 board
* CCed LED mailing list

Manivannan Sadhasivam (7):
  arm64: dts: rockchip: ficus: Add on-board LED support
  arm64: dts: rockchip: rock960: Add on-board LED support
  arm64: dts: hisilicon: hikey: Standardize LED labels and triggers
  arm64: dts: hisilicon: hikey960: Standardize LED labels and triggers
  arm64: dts: hisilicon: poplar: Standardize LED labels and triggers
  arm64: dts: xilinx: ultra96: Standardize LED labels and triggers
  arm64: dts: qcom: apq8016-sbc: Standardize LED labels

 .../boot/dts/hisilicon/hi3660-hikey960.dts    | 18 ++---
 .../boot/dts/hisilicon/hi3798cv200-poplar.dts | 13 +--
 .../arm64/boot/dts/hisilicon/hi6220-hikey.dts | 25 +++---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi     | 12 +--
 arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 78 ++++++++++++++++++
 .../boot/dts/rockchip/rk3399-rock960.dts      | 79 +++++++++++++++++++
 .../boot/dts/xilinx/zynqmp-zcu100-revC.dts    | 15 ++--
 7 files changed, 200 insertions(+), 40 deletions(-)

Comments

Linus Walleij Oct. 31, 2018, 1:38 p.m. UTC | #1
On Mon, Oct 29, 2018 at 10:43 AM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:

> This patchset standardizes the onboard LEDs on 96Boards by maintaining
> common labels and triggers as below:
>
> green:user1  default-trigger: heartbeat
> green:user2  default-trigger: mmc0/disk-activity (onboard-storage)
> green:user3  default-trigger: mmc1 (SD card)
> green:user4  default-trigger: none, panic-indicator
> yellow:wlan  default-trigger: phy0tx
> blue:bt      default-trigger: hci0-power
>
> This standardization is required to provide a common behaviour of LEDs
> across all mainline supported 96Boards and also making it easier to
> control it using an userspace library like MRAA.
>
> For Rock960 and Ficus boards, the LED support is added in this patchset.
> Rest of the boards are converted to adopt the standard.
>
> Note: Since there is no UFS trigger available for now, user2 LED trigger
> is set to none on HiKey960.

This series:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

It makes a lot of sense to try to unify the userspace ABI so we get
some kind of order here instead of trying to counteract it with
per-device kludges in userspace. It definately makes things better!

Yours,
Linus Walleij
Linus Walleij Oct. 31, 2018, 9:17 p.m. UTC | #2
On Wed, Oct 31, 2018 at 4:47 PM Michal Simek <monstr@monstr.eu> wrote:

> No doubt about it that this is good. If this is there from day 1 all will be good.
> I am just saying that we are all the time
> saying that we shouldn't break userspace. Right now if there is single application
> which uses existing names we are breaking it.

Yeah that's the problem, the approach is usually that if a tree falls
in the forest and noone is there to hear it, then it doesn't make a
sound.

But we can't assume someone is there as the safe default either.

I'd say apply it and see what happens, people are supposed to test.

Yours,
Linus Walleij
Heiko Stuebner Nov. 1, 2018, 10:49 a.m. UTC | #3
Am Mittwoch, 31. Oktober 2018, 22:17:29 CET schrieb Linus Walleij:
> On Wed, Oct 31, 2018 at 4:47 PM Michal Simek <monstr@monstr.eu> wrote:
> > No doubt about it that this is good. If this is there from day 1 all will
> > be good. I am just saying that we are all the time
> > saying that we shouldn't break userspace. Right now if there is single
> > application which uses existing names we are breaking it.
> 
> Yeah that's the problem, the approach is usually that if a tree falls
> in the forest and noone is there to hear it, then it doesn't make a
> sound.
> 
> But we can't assume someone is there as the safe default either.
> 
> I'd say apply it and see what happens, people are supposed to test.

At least for the Rockchip boards I'm somewhat confident, that they should
be new enough to not have anybody building cludges - especially as I think
LEDs might not be the most interesting device on such boards :-) .

So while I can apply the Rockchip patches, I'm still hoping for some
kind of consensus beforehand, least we roll it back after the fact  ;-) .

Heiko
Wei Xu Nov. 29, 2018, 3:42 p.m. UTC | #4
Hi Manivannan,

On 2018/10/31 13:38, Linus Walleij wrote:
> On Mon, Oct 29, 2018 at 10:43 AM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> 
>> This patchset standardizes the onboard LEDs on 96Boards by maintaining
>> common labels and triggers as below:
>>
>> green:user1  default-trigger: heartbeat
>> green:user2  default-trigger: mmc0/disk-activity (onboard-storage)
>> green:user3  default-trigger: mmc1 (SD card)
>> green:user4  default-trigger: none, panic-indicator
>> yellow:wlan  default-trigger: phy0tx
>> blue:bt      default-trigger: hci0-power
>>
>> This standardization is required to provide a common behaviour of LEDs
>> across all mainline supported 96Boards and also making it easier to
>> control it using an userspace library like MRAA.
>>
>> For Rock960 and Ficus boards, the LED support is added in this patchset.
>> Rest of the boards are converted to adopt the standard.
>>
>> Note: Since there is no UFS trigger available for now, user2 LED trigger
>> is set to none on HiKey960.
> 
> This series:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> 
> It makes a lot of sense to try to unify the userspace ABI so we get
> some kind of order here instead of trying to counteract it with
> per-device kludges in userspace. It definately makes things better!
> 
> Yours,
> Linus Walleij
> 
> .
> 

Applied hisilicon part(patch 3,4 and 5) to the hisilicon soc dt tree.
Thanks!

Best Regards,
Wei