diff mbox series

[platform-next,2/2] leds: mlxreg: Skip setting LED color during initialization

Message ID 20230822172757.60851-3-vadimp@nvidia.com
State New
Headers show
Series leds: mlxreg: Change behavior during init and remove unused definition | expand

Commit Message

Vadim Pasternak Aug. 22, 2023, 5:27 p.m. UTC
Hardware controls LED through CPLD device and LED control ownership
passes to the software after it performs the first write operation for
any LED on a system.
For example, hardware sets "system" LED "green blink" during boot and
might change it to "red", in case something is went wrong from hardware
point of view.
The motivation for not setting LED during kernel initialization is for
keeping hardware settings visible for user, until user will not decide
to set LEDs according to user OS specific requirements.

Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.com>
---
 drivers/leds/leds-mlxreg.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c
index 916544e95e26..d4e08d243804 100644
--- a/drivers/leds/leds-mlxreg.c
+++ b/drivers/leds/leds-mlxreg.c
@@ -240,9 +240,6 @@  static int mlxreg_led_config(struct mlxreg_led_priv_data *priv)
 		if (err)
 			return err;
 
-		if (led_cdev->brightness)
-			mlxreg_led_brightness_set(led_cdev,
-						  led_cdev->brightness);
 		dev_info(led_cdev->dev, "label: %s, mask: 0x%02x, offset:0x%02x\n",
 			 data->label, data->mask, data->reg);
 	}