mbox series

[SRU,K,0/3] Support LEDs on the SiFive Unmatched

Message ID 20220824110507.1114445-1-emil.renner.berthing@canonical.com
Headers show
Series Support LEDs on the SiFive Unmatched | expand

Message

Emil Renner Berthing Aug. 24, 2022, 11:05 a.m. UTC
[Impact]

 * The Ubuntu RISC-V kernel carries out-of-tree patches to enable
   the two LEDs on the SiFive Unmatched board.

 * There is now an upstream solution to enable the LEDs that appears
   a little different from userspace. With the out-of-tree patches the
   three colours in the RGB LED appears as 3 different LEDs, but upstream
   models them as 1 RGB LED.

 * Replacing the out-of-tree patches with the upstream solution will
   make Ubuntu kernels behave like the upstream kernel going forward.

[Test Plan]

 * Boot Ubuntu on the Unmatched board and look at how the LEDs show up
   in /sys/class/leds

 * Check that both the green D12 and all three colours of D2 can still
   be controlled from userspace.

[Where problems could occur]

 * Users may have scripts setting up LEDs that will no longer work when
   updating to Kinetic with this change.

Emil Renner Berthing (3):
  dt-bindings: leds: pwm-multicolor: Add active-low property
  leds: pwm-multicolor: Support active-low LEDs
  riscv: dts: sifive unmatched: Add PWM controlled LEDs

 .../bindings/leds/leds-pwm-multicolor.yaml    |  4 ++
 .../boot/dts/sifive/hifive-unmatched-a00.dts  | 42 +++++++++++++++++++
 drivers/leds/rgb/leds-pwm-multicolor.c        |  5 +++
 3 files changed, 51 insertions(+)

Comments

Tim Gardner Aug. 24, 2022, 12:28 p.m. UTC | #1
On 8/24/22 05:05, Emil Renner Berthing wrote:
> [Impact]
> 
>   * The Ubuntu RISC-V kernel carries out-of-tree patches to enable
>     the two LEDs on the SiFive Unmatched board.
> 
>   * There is now an upstream solution to enable the LEDs that appears
>     a little different from userspace. With the out-of-tree patches the
>     three colours in the RGB LED appears as 3 different LEDs, but upstream
>     models them as 1 RGB LED.
> 
>   * Replacing the out-of-tree patches with the upstream solution will
>     make Ubuntu kernels behave like the upstream kernel going forward.
> 
> [Test Plan]
> 
>   * Boot Ubuntu on the Unmatched board and look at how the LEDs show up
>     in /sys/class/leds
> 
>   * Check that both the green D12 and all three colours of D2 can still
>     be controlled from userspace.
> 
> [Where problems could occur]
> 
>   * Users may have scripts setting up LEDs that will no longer work when
>     updating to Kinetic with this change.
> 
> Emil Renner Berthing (3):
>    dt-bindings: leds: pwm-multicolor: Add active-low property
>    leds: pwm-multicolor: Support active-low LEDs
>    riscv: dts: sifive unmatched: Add PWM controlled LEDs
> 
>   .../bindings/leds/leds-pwm-multicolor.yaml    |  4 ++
>   .../boot/dts/sifive/hifive-unmatched-a00.dts  | 42 +++++++++++++++++++
>   drivers/leds/rgb/leds-pwm-multicolor.c        |  5 +++
>   3 files changed, 51 insertions(+)
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Kleber Souza Aug. 24, 2022, 3:18 p.m. UTC | #2
On 24.08.22 13:05, Emil Renner Berthing wrote:
> [Impact]
> 
>   * The Ubuntu RISC-V kernel carries out-of-tree patches to enable
>     the two LEDs on the SiFive Unmatched board.
> 
>   * There is now an upstream solution to enable the LEDs that appears
>     a little different from userspace. With the out-of-tree patches the
>     three colours in the RGB LED appears as 3 different LEDs, but upstream
>     models them as 1 RGB LED.
> 
>   * Replacing the out-of-tree patches with the upstream solution will
>     make Ubuntu kernels behave like the upstream kernel going forward.
> 
> [Test Plan]
> 
>   * Boot Ubuntu on the Unmatched board and look at how the LEDs show up
>     in /sys/class/leds
> 
>   * Check that both the green D12 and all three colours of D2 can still
>     be controlled from userspace.
> 
> [Where problems could occur]
> 
>   * Users may have scripts setting up LEDs that will no longer work when
>     updating to Kinetic with this change.
> 
> Emil Renner Berthing (3):
>    dt-bindings: leds: pwm-multicolor: Add active-low property
>    leds: pwm-multicolor: Support active-low LEDs
>    riscv: dts: sifive unmatched: Add PWM controlled LEDs
> 
>   .../bindings/leds/leds-pwm-multicolor.yaml    |  4 ++
>   .../boot/dts/sifive/hifive-unmatched-a00.dts  | 42 +++++++++++++++++++
>   drivers/leds/rgb/leds-pwm-multicolor.c        |  5 +++
>   3 files changed, 51 insertions(+)
> 

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

Thanks
Dimitri John Ledkov Aug. 26, 2022, 12:40 p.m. UTC | #3
On 24/08/2022 12:05, Emil Renner Berthing wrote:
> [Impact]
> 
>  * The Ubuntu RISC-V kernel carries out-of-tree patches to enable
>    the two LEDs on the SiFive Unmatched board.
> 
>  * There is now an upstream solution to enable the LEDs that appears
>    a little different from userspace. With the out-of-tree patches the
>    three colours in the RGB LED appears as 3 different LEDs, but upstream
>    models them as 1 RGB LED.
> 
>  * Replacing the out-of-tree patches with the upstream solution will
>    make Ubuntu kernels behave like the upstream kernel going forward.
> 
> [Test Plan]
> 
>  * Boot Ubuntu on the Unmatched board and look at how the LEDs show up
>    in /sys/class/leds
> 
>  * Check that both the green D12 and all three colours of D2 can still
>    be controlled from userspace.
> 
> [Where problems could occur]
> 
>  * Users may have scripts setting up LEDs that will no longer work when
>    updating to Kinetic with this change.
> 
> Emil Renner Berthing (3):
>   dt-bindings: leds: pwm-multicolor: Add active-low property
>   leds: pwm-multicolor: Support active-low LEDs
>   riscv: dts: sifive unmatched: Add PWM controlled LEDs
> 
>  .../bindings/leds/leds-pwm-multicolor.yaml    |  4 ++
>  .../boot/dts/sifive/hifive-unmatched-a00.dts  | 42 +++++++++++++++++++
>  drivers/leds/rgb/leds-pwm-multicolor.c        |  5 +++
>  3 files changed, 51 insertions(+)
> 

Applied to kinetic:linux master-next branch.