[PATCH 24/31] video: backlight: changing LED_* from enum led_brightness to actual value

Subsystems: adp8860 backlight driver (adp8860/adp8861/adp8863), backlight class/subsystem, framebuffer layer, the rest

STALE1381d

5 messages, 3 authors, 2022-01-24 · open the first message on its own page

[PATCH 24/31] video: backlight: changing LED_* from enum led_brightness to actual value

From: Luiz Sampaio <hidden>
Date: 2022-01-21 16:57:41

The enum led_brightness, which contains the declaration of LED_OFF,
LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports
max_brightness.
---
 drivers/video/backlight/adp8860_bl.c | 4 ++--
 drivers/video/backlight/adp8870_bl.c | 4 ++--
 drivers/video/backlight/led_bl.c     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 8ec19425671f..063be4189e7e 100644
--- a/drivers/video/backlight/adp8860_bl.c
+++ b/drivers/video/backlight/adp8860_bl.c
@@ -261,10 +261,10 @@ static int adp8860_led_probe(struct i2c_client *client)
 		led_dat->cdev.name = cur_led->name;
 		led_dat->cdev.default_trigger = cur_led->default_trigger;
 		led_dat->cdev.brightness_set = adp8860_led_set;
-		led_dat->cdev.brightness = LED_OFF;
+		led_dat->cdev.brightness = 0;
 		led_dat->flags = cur_led->flags >> FLAG_OFFT_SHIFT;
 		led_dat->client = client;
-		led_dat->new_brightness = LED_OFF;
+		led_dat->new_brightness = 0;
 		INIT_WORK(&led_dat->work, adp8860_led_work);
 
 		ret = led_classdev_register(&client->dev, &led_dat->cdev);
diff --git a/drivers/video/backlight/adp8870_bl.c b/drivers/video/backlight/adp8870_bl.c
index 8b5213a39527..b04faf8d631d 100644
--- a/drivers/video/backlight/adp8870_bl.c
+++ b/drivers/video/backlight/adp8870_bl.c
@@ -287,10 +287,10 @@ static int adp8870_led_probe(struct i2c_client *client)
 		led_dat->cdev.name = cur_led->name;
 		led_dat->cdev.default_trigger = cur_led->default_trigger;
 		led_dat->cdev.brightness_set = adp8870_led_set;
-		led_dat->cdev.brightness = LED_OFF;
+		led_dat->cdev.brightness = 0;
 		led_dat->flags = cur_led->flags >> FLAG_OFFT_SHIFT;
 		led_dat->client = client;
-		led_dat->new_brightness = LED_OFF;
+		led_dat->new_brightness = 0;
 		INIT_WORK(&led_dat->work, adp8870_led_work);
 
 		ret = led_classdev_register(&client->dev, &led_dat->cdev);
diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c
index f54d256e2d54..1b869624b4f8 100644
--- a/drivers/video/backlight/led_bl.c
+++ b/drivers/video/backlight/led_bl.c
@@ -46,7 +46,7 @@ static void led_bl_power_off(struct led_bl_data *priv)
 		return;
 
 	for (i = 0; i < priv->nb_leds; i++)
-		led_set_brightness(priv->leds[i], LED_OFF);
+		led_set_brightness(priv->leds[i], 0);
 
 	priv->enabled = false;
 }
-- 
2.34.1

Re: [PATCH 24/31] video: backlight: changing LED_* from enum led_brightness to actual value

From: Daniel Thompson <hidden>
Date: 2022-01-21 17:05:48

On Fri, Jan 21, 2022 at 01:54:29PM -0300, Luiz Sampaio wrote:
The enum led_brightness, which contains the declaration of LED_OFF,
LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports
max_brightness.
Reviewed-by: Daniel Thompson <redacted>

BTW it looks like this patch might wants to land in one tree (I can't
see since I'm only on copy of this one). If so please discuss with Lee
how you want to land it. Put more directly, please don't treat my
Reviewed-by: as an Acked-by: ;-) !


Daniel.

quoted hunk
---
 drivers/video/backlight/adp8860_bl.c | 4 ++--
 drivers/video/backlight/adp8870_bl.c | 4 ++--
 drivers/video/backlight/led_bl.c     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 8ec19425671f..063be4189e7e 100644
--- a/drivers/video/backlight/adp8860_bl.c
+++ b/drivers/video/backlight/adp8860_bl.c
@@ -261,10 +261,10 @@ static int adp8860_led_probe(struct i2c_client *client)
 		led_dat->cdev.name = cur_led->name;
 		led_dat->cdev.default_trigger = cur_led->default_trigger;
 		led_dat->cdev.brightness_set = adp8860_led_set;
-		led_dat->cdev.brightness = LED_OFF;
+		led_dat->cdev.brightness = 0;
 		led_dat->flags = cur_led->flags >> FLAG_OFFT_SHIFT;
 		led_dat->client = client;
-		led_dat->new_brightness = LED_OFF;
+		led_dat->new_brightness = 0;
 		INIT_WORK(&led_dat->work, adp8860_led_work);
 
 		ret = led_classdev_register(&client->dev, &led_dat->cdev);
diff --git a/drivers/video/backlight/adp8870_bl.c b/drivers/video/backlight/adp8870_bl.c
index 8b5213a39527..b04faf8d631d 100644
--- a/drivers/video/backlight/adp8870_bl.c
+++ b/drivers/video/backlight/adp8870_bl.c
@@ -287,10 +287,10 @@ static int adp8870_led_probe(struct i2c_client *client)
 		led_dat->cdev.name = cur_led->name;
 		led_dat->cdev.default_trigger = cur_led->default_trigger;
 		led_dat->cdev.brightness_set = adp8870_led_set;
-		led_dat->cdev.brightness = LED_OFF;
+		led_dat->cdev.brightness = 0;
 		led_dat->flags = cur_led->flags >> FLAG_OFFT_SHIFT;
 		led_dat->client = client;
-		led_dat->new_brightness = LED_OFF;
+		led_dat->new_brightness = 0;
 		INIT_WORK(&led_dat->work, adp8870_led_work);
 
 		ret = led_classdev_register(&client->dev, &led_dat->cdev);
diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c
index f54d256e2d54..1b869624b4f8 100644
--- a/drivers/video/backlight/led_bl.c
+++ b/drivers/video/backlight/led_bl.c
@@ -46,7 +46,7 @@ static void led_bl_power_off(struct led_bl_data *priv)
 		return;
 
 	for (i = 0; i < priv->nb_leds; i++)
-		led_set_brightness(priv->leds[i], LED_OFF);
+		led_set_brightness(priv->leds[i], 0);
 
 	priv->enabled = false;
 }
-- 
2.34.1

Re: [PATCH 24/31] video: backlight: changing LED_* from enum led_brightness to actual value

From: Luiz Sampaio <hidden>
Date: 2022-01-21 18:05:15

Hello, Daniel

Thanks for your reply. This is one of my first patches, so I am still
learning. This series of patches affects others subsystems too (hid,
leds, sound etc). Should I create series for each subsystem
separately, instead of creating one series for everyone?
What do you mean by "this patch might wants to land in one tree"?

Thank you for your attention!

Re: [PATCH 24/31] video: backlight: changing LED_* from enum led_brightness to actual value

From: Luiz Sampaio <hidden>
Date: 2022-01-21 18:08:55

Hello, Daniel

Thanks for your reply. This is one of my first patches, so I am still
learning. This series of patches affects others subsystems too (hid,
leds, sound etc). Should I create series for each subsystem
separately, instead of creating one series for everyone?
What do you mean by "this patch might wants to land in one tree"?

Thank you for your attention!

Re: [PATCH 24/31] video: backlight: changing LED_* from enum led_brightness to actual value

From: Lee Jones <hidden>
Date: 2022-01-24 10:53:25

On Fri, 21 Jan 2022, Luiz Sampaio wrote:
Hello, Daniel

Thanks for your reply. This is one of my first patches, so I am still
learning. This series of patches affects others subsystems too (hid,
leds, sound etc). Should I create series for each subsystem
separately, instead of creating one series for everyone?
What do you mean by "this patch might wants to land in one tree"?
Can the individual patches be applied on their own without causing
issues (warnings/errors) with the build?  If so, they can be applied
separately via their associated subsystem trees.  If not, someone will
have to collect them all and take them via a single tree with Acks
from the other subsystem maintainers.

It's difficult to make that decision for ourselves since you didn't
share all of the patches with all of the maintainers.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help