[PATCH linux dev-6.5] leds: pca955x: Set default trigger state

Eddie James eajames at linux.ibm.com
Fri Oct 20 02:26:46 AEDT 2023


If the LED is set to keep the default state, the blink state
needs to be set in the core when the LED device is added so the
state is kept in sync.

Signed-off-by: Eddie James <eajames at linux.ibm.com>
---
 drivers/leds/leds-pca955x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c
index 240a31e813e7..b96f3a6b636e 100644
--- a/drivers/leds/leds-pca955x.c
+++ b/drivers/leds/leds-pca955x.c
@@ -708,6 +708,7 @@ static int pca955x_probe(struct i2c_client *client)
 				ls2[reg] = pca955x_ledsel(ls2[reg], bit, PCA955X_LS_LED_ON);
 			else if (pca955x_ledstate(ls2[reg], bit) == PCA955X_LS_BLINK0) {
 				keep_psc0 = true;
+				led->default_trigger = "timer";
 				set_bit(i, &pca955x->active_blink);
 			}
 
-- 
2.39.3



More information about the openbmc mailing list