[PATCH linux dev-5.10 06/35] ARM: dts: aspeed: rainier: Add leds that are off PCA9552

Joel Stanley joel at jms.id.au
Fri Mar 12 11:09:26 AEDT 2021


On Mon, 8 Mar 2021 at 22:54, Eddie James <eajames at linux.ibm.com> wrote:
>
> From: Vishwanatha Subbanna <vishwa at linux.vnet.ibm.com>
>
> These LEDs are on the fans and are connected via a
> pca9551 i2c expander

This change doesn't make sense. The pca9551 is an i2c LED expander, so
we don't need to expose the pins as GPIOs and then attach a gpio-leds
driver to them. We should instead simply configure the pca955x driver
to drive the LEDs as LEDs.

>
> Signed-off-by: Vishwanatha Subbanna <vishwa at linux.vnet.ibm.com>
> ---
>  arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 41 ++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts b/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
> index 6684485a2db0..514a14d3f914 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
> @@ -263,6 +263,47 @@ fan5-presence {
>                         linux,code = <11>;
>                 };
>         };
> +
> +       leds {
> +               compatible = "gpio-leds";
> +
> +               fan0 {
> +                       retain-state-shutdown;
> +                       default-state = "keep";
> +                       gpios = <&pca0 0 GPIO_ACTIVE_LOW>;
> +               };
> +
> +               fan1 {
> +                       retain-state-shutdown;
> +                       default-state = "keep";
> +                       gpios = <&pca0 1 GPIO_ACTIVE_LOW>;
> +               };
> +
> +               fan2 {
> +                       retain-state-shutdown;
> +                       default-state = "keep";
> +                       gpios = <&pca0 2 GPIO_ACTIVE_LOW>;
> +               };
> +
> +               fan3 {
> +                       retain-state-shutdown;
> +                       default-state = "keep";
> +                       gpios = <&pca0 3 GPIO_ACTIVE_LOW>;
> +               };
> +
> +               fan4 {
> +                       retain-state-shutdown;
> +                       default-state = "keep";
> +                       gpios = <&pca0 4 GPIO_ACTIVE_LOW>;
> +               };
> +
> +               fan5 {
> +                       retain-state-shutdown;
> +                       default-state = "keep";
> +                       gpios = <&pca0 5 GPIO_ACTIVE_LOW>;
> +               };
> +       };
> +
>  };
>
>  &ehci1 {
> --
> 2.27.0
>


More information about the openbmc mailing list