Message ID | 20230714085253.13544-3-kabel@kernel.org |
---|---|
State | New |
Headers | show |
Series | leds: turris-omnia: updates | expand |
On Fri 2023-07-14 10:52:52, Marek Beh??n wrote: > The default color of each LED before driver probe is (255, 255, 255). > Initialize multi_intensity to this value, so that it corresponds to the > reality. > > Signed-off-by: Marek Beh??n <kabel@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> > +++ b/drivers/leds/leds-turris-omnia.c > @@ -98,10 +98,13 @@ static int omnia_led_register(struct i2c_client *client, struct omnia_led *led, > } > > led->subled_info[0].color_index = LED_COLOR_ID_RED; > + led->subled_info[0].intensity = 255; > led->subled_info[0].channel = 0; > led->subled_info[1].color_index = LED_COLOR_ID_GREEN; > + led->subled_info[1].intensity = 255; > led->subled_info[1].channel = 1; > led->subled_info[2].color_index = LED_COLOR_ID_BLUE; > + led->subled_info[2].intensity = 255; > led->subled_info[2].channel = 2; > > led->mc_cdev.subled_info = led->subled_info; > -- > 2.41.0
diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c index c063b6b710f9..7977c0372667 100644 --- a/drivers/leds/leds-turris-omnia.c +++ b/drivers/leds/leds-turris-omnia.c @@ -98,10 +98,13 @@ static int omnia_led_register(struct i2c_client *client, struct omnia_led *led, } led->subled_info[0].color_index = LED_COLOR_ID_RED; + led->subled_info[0].intensity = 255; led->subled_info[0].channel = 0; led->subled_info[1].color_index = LED_COLOR_ID_GREEN; + led->subled_info[1].intensity = 255; led->subled_info[1].channel = 1; led->subled_info[2].color_index = LED_COLOR_ID_BLUE; + led->subled_info[2].intensity = 255; led->subled_info[2].channel = 2; led->mc_cdev.subled_info = led->subled_info;
The default color of each LED before driver probe is (255, 255, 255). Initialize multi_intensity to this value, so that it corresponds to the reality. Signed-off-by: Marek BehĂșn <kabel@kernel.org> --- drivers/leds/leds-turris-omnia.c | 3 +++ 1 file changed, 3 insertions(+)