Skip to contentSkip to conversation

backlight: Remove struct backlight_properties.fb_blank

PATCH Applied Thomas Zimmermann 5 participants 16 messages Mar 19, 2024 – Mar 28, 2024

Subsystems (10)
lore
Share & tools
lore
#0 lore raw

v2 cover backlight: Remove struct backlight_properties.fb_blank

The field fb_blank in struct backlight_properties has been marked for removal. Remove it in favor of the power and state fields.

Patches 1 to 5 prepare several backlight drivers. They remove fb_blank or replace driver code with existing helpers.

Patch 6 removes fb_blank from backlight core and drivers. This resolves another dependency between backlight nad fbdev.

v2:
- omap1: replace 'power' with 'enable'
- clarify commit messages

Thomas Zimmermann (6):
auxdisplay: ht16k33: Replace use of fb_blank with backlight helper
backlight: omap1: Remove unused struct omap_backlight_config.set_power
backlight: omap1: Replace FB_BLANK_ states with simple on/off
fbdev: omap2/omapfb: Replace use of fb_blank with backlight helpers
staging: fbtft: Remove reference to fb_blank
backlight: Remove fb_blank from struct backlight_properties

 drivers/auxdisplay/ht16k33.c                  |  7 +--
 drivers/staging/fbtft/fb_ssd1351.c            |  4 +-
 drivers/staging/fbtft/fbtft-core.c            |  5 +-
 drivers/video/backlight/backlight.c           |  2 -
 drivers/video/backlight/mp3309c.c             |  1 -
 drivers/video/backlight/omap1_bl.c            | 47 +++++++------------
 drivers/video/fbdev/atmel_lcdfb.c             |  1 -
 .../omap2/omapfb/displays/panel-dsi-cm.c      |  7 +--
 .../omapfb/displays/panel-sony-acx565akm.c    | 10 +---
 include/linux/backlight.h                     | 25 +---------
 include/linux/platform_data/omap1_bl.h        |  1 -
 11 files changed, 26 insertions(+), 84 deletions(-)
Signature · 1 line
2.44.0
#1 lore raw

PATCH v2 1/6 auxdisplay: ht16k33: Replace use of fb_blank with backlight helper

Replace the use of struct backlight_properties.fb_blank with a call to backlight_get_brightness(). The helper implements similar logic as the driver's function. It also accounts for BL_CORE_SUSPENDED for drivers that set BL_CORE_SUSPENDRESUME. Ht16k33 doesn't use this, so there's no change in behaviour here.

---

v2:
- update commit-message style according to subsystem (Lee)
- declare local var as const (Miguel)
- clarify BL_CORE_SUSPENDED (Miguel)
- fix grammar in commit message (Dan)

---
 drivers/auxdisplay/ht16k33.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/auxdisplay/ht16k33.c +1 -6
index a90430b7d07ba..9081a5797c552 100644
@@ -314,14 +314,9 @@ static int ht16k33_initialize(struct ht16k33_priv *priv)
 
 static int ht16k33_bl_update_status(struct backlight_device *bl)
 {
-	int brightness = bl->props.brightness;
+	const int brightness = backlight_get_brightness(bl);
 	struct ht16k33_priv *priv = bl_get_data(bl);
 
-	if (bl->props.power != FB_BLANK_UNBLANK ||
-	    bl->props.fb_blank != FB_BLANK_UNBLANK ||
-	    bl->props.state & BL_CORE_FBBLANK)
-		brightness = 0;
-
 	return ht16k33_brightness_set(priv, brightness);
 }
 
Signature · 1 line
2.44.0
#2 lore raw

PATCH v2 2/6 backlight: omap1: Remove unused struct omap_backlight_config.set_power

In reply to Thomas Zimmermann

The callback set_power in struct omap_backlight_config is not implemented anywhere. Remove it from the structure and driver.

---

v2:
- update commit-message style according to subsystem (Lee)

---
 drivers/video/backlight/omap1_bl.c     | 3 ---
 include/linux/platform_data/omap1_bl.h | 1 -
 2 files changed, 4 deletions(-)
drivers/video/backlight/omap1_bl.c +0 -3
index 69a49384b3de4..84d148f385951 100644
@@ -39,9 +39,6 @@ static inline void omapbl_send_enable(int enable)
 
 static void omapbl_blank(struct omap_backlight *bl, int mode)
 {
-	if (bl->pdata->set_power)
-		bl->pdata->set_power(bl->dev, mode);
-
 	switch (mode) {
 	case FB_BLANK_NORMAL:
 	case FB_BLANK_VSYNC_SUSPEND:
include/linux/platform_data/omap1_bl.h +0 -1
index 5e8b17d77a5fe..3d0bab31a0a94 100644
@@ -6,7 +6,6 @@
 
 struct omap_backlight_config {
 	int default_intensity;
-	int (*set_power)(struct device *dev, int state);
 };
 
 #endif
Signature · 1 line
2.44.0
#3 lore raw

PATCH v2 3/6 backlight: omap1: Replace FB_BLANK_ states with simple on/off

In reply to Thomas Zimmermann

The backlight is on for fb_blank eq FB_BLANK_UNBLANK, or off for any other value in fb_blank. But the field fb_blank in struct backlight_properties is deprecated and should not be used any longer.

Replace the test for fb_blank in omap's backlight code with a simple boolean parameter and push the test into the update_status helper. Instead of reading fb_blank directly, decode the backlight device's status with backlight_is_blank().

---

v2:
- update commit-message style according to subsystem (Lee)
- rename 'power/on' to 'enable/enabled' (Daniel)

---
 drivers/video/backlight/omap1_bl.c | 43 +++++++++++++-----------------
 1 file changed, 18 insertions(+), 25 deletions(-)
drivers/video/backlight/omap1_bl.c +18 -25
index 84d148f385951..636b390f78f04 100644
@@ -9,7 +9,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
-#include <linux/fb.h>
 #include <linux/backlight.h>
 #include <linux/slab.h>
 #include <linux/platform_data/omap1_bl.h>
@@ -20,7 +19,7 @@
 #define OMAPBL_MAX_INTENSITY		0xff
 
 struct omap_backlight {
-	int powermode;
+	bool enabled;
 	int current_intensity;
 
 	struct device *dev;
@@ -37,21 +36,14 @@ static inline void omapbl_send_enable(int enable)
 	omap_writeb(enable, OMAP_PWL_CLK_ENABLE);
 }
 
-static void omapbl_blank(struct omap_backlight *bl, int mode)
+static void omapbl_enable(struct omap_backlight *bl, bool enable)
 {
-	switch (mode) {
-	case FB_BLANK_NORMAL:
-	case FB_BLANK_VSYNC_SUSPEND:
-	case FB_BLANK_HSYNC_SUSPEND:
-	case FB_BLANK_POWERDOWN:
-		omapbl_send_intensity(0);
-		omapbl_send_enable(0);
-		break;
-
-	case FB_BLANK_UNBLANK:
+	if (enable) {
 		omapbl_send_intensity(bl->current_intensity);
 		omapbl_send_enable(1);
-		break;
+	} else {
+		omapbl_send_intensity(0);
+		omapbl_send_enable(0);
 	}
 }
 
@@ -61,7 +53,7 @@ static int omapbl_suspend(struct device *dev)
 	struct backlight_device *bl_dev = dev_get_drvdata(dev);
 	struct omap_backlight *bl = bl_get_data(bl_dev);
 
-	omapbl_blank(bl, FB_BLANK_POWERDOWN);
+	omapbl_enable(bl, false);
 	return 0;
 }
 
@@ -70,33 +62,34 @@ static int omapbl_resume(struct device *dev)
 	struct backlight_device *bl_dev = dev_get_drvdata(dev);
 	struct omap_backlight *bl = bl_get_data(bl_dev);
 
-	omapbl_blank(bl, bl->powermode);
+	omapbl_enable(bl, bl->enabled);
 	return 0;
 }
 #endif
 
-static int omapbl_set_power(struct backlight_device *dev, int state)
+static void omapbl_set_enabled(struct backlight_device *dev, bool enable)
 {
 	struct omap_backlight *bl = bl_get_data(dev);
 
-	omapbl_blank(bl, state);
-	bl->powermode = state;
-
-	return 0;
+	omapbl_enable(bl, enable);
+	bl->enabled = enable;
 }
 
 static int omapbl_update_status(struct backlight_device *dev)
 {
 	struct omap_backlight *bl = bl_get_data(dev);
+	bool enable;
 
 	if (bl->current_intensity != dev->props.brightness) {
-		if (bl->powermode == FB_BLANK_UNBLANK)
+		if (bl->enabled)
 			omapbl_send_intensity(dev->props.brightness);
 		bl->current_intensity = dev->props.brightness;
 	}
 
-	if (dev->props.fb_blank != bl->powermode)
-		omapbl_set_power(dev, dev->props.fb_blank);
+	enable = !backlight_is_blank(dev);
+
+	if (enable != bl->enabled)
+		omapbl_set_enabled(dev, enable);
 
 	return 0;
 }
@@ -136,7 +129,7 @@ static int omapbl_probe(struct platform_device *pdev)
 	if (IS_ERR(dev))
 		return PTR_ERR(dev);
 
-	bl->powermode = FB_BLANK_POWERDOWN;
+	bl->enabled = false;
 	bl->current_intensity = 0;
 
 	bl->pdata = pdata;
Signature · 1 line
2.44.0
Reviewed-by on v2 3/6
#4 lore raw

Re: [PATCH v2 3/6] backlight: omap1: Replace FB_BLANK_ states with simple on/off

Quoted 5 lines · Thomas Zimmermann

The backlight is on for fb_blank eq FB_BLANK_UNBLANK, or off for any other value in fb_blank. But the field fb_blank in struct backlight_properties is deprecated and should not be used any longer.

Quoted 7 lines

Replace the test for fb_blank in omap's backlight code with a simple boolean parameter and push the test into the update_status helper. Instead of reading fb_blank directly, decode the backlight device's status with backlight_is_blank().

Daniel.

#5 lore raw

PATCH v2 4/6 fbdev: omap2/omapfb: Replace use of fb_blank with backlight helpers

In reply to Thomas Zimmermann

Replace the use of struct backlight_properties.fb_blank with backlight helpers. This effects testing if the backlight is blanked and reading the backlight's brightness level.

---

v2:
- update commit-message style according to subsystem (Lee)

---
 drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 6 +-----
 .../fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c   | 9 ++-------
 2 files changed, 3 insertions(+), 12 deletions(-)
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +1 -5
index adb8881bac285..47683a6c00767 100644
@@ -356,11 +356,7 @@ static int dsicm_bl_update_status(struct backlight_device *dev)
 
 static int dsicm_bl_get_intensity(struct backlight_device *dev)
 {
-	if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
-			dev->props.power == FB_BLANK_UNBLANK)
-		return dev->props.brightness;
-
-	return 0;
+	return backlight_get_brightness(dev);
 }
 
 static const struct backlight_ops dsicm_bl_ops = {
drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c +2 -7
index 685c63aa4e030..9d3ce234a7874 100644
@@ -340,11 +340,7 @@ static int acx565akm_bl_update_status(struct backlight_device *dev)
 
 	dev_dbg(&ddata->spi->dev, "%s\n", __func__);
 
-	if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
-			dev->props.power == FB_BLANK_UNBLANK)
-		level = dev->props.brightness;
-	else
-		level = 0;
+	level = backlight_get_brightness(dev);
 
 	if (ddata->has_bc)
 		acx565akm_set_brightness(ddata, level);
@@ -363,8 +359,7 @@ static int acx565akm_bl_get_intensity(struct backlight_device *dev)
 	if (!ddata->has_bc)
 		return -ENODEV;
 
-	if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
-			dev->props.power == FB_BLANK_UNBLANK) {
+	if (!backlight_is_blank(dev)) {
 		if (ddata->has_bc)
 			return acx565akm_get_actual_brightness(ddata);
 		else
Signature · 1 line
2.44.0
#6 lore raw

PATCH v2 5/6 staging: fbtft: Remove reference to fb_blank

In reply to Thomas Zimmermann

The field fb_blank in struct backlight_properties is deprecated and should not be used. Don't output its value in the driver's debug print.

---
 drivers/staging/fbtft/fb_ssd1351.c | 4 +---
 drivers/staging/fbtft/fbtft-core.c | 5 ++---
 2 files changed, 3 insertions(+), 6 deletions(-)
drivers/staging/fbtft/fb_ssd1351.c +1 -3
index 72172e870007e..ca2cba2185ae3 100644
@@ -194,9 +194,7 @@ static int update_onboard_backlight(struct backlight_device *bd)
 	struct fbtft_par *par = bl_get_data(bd);
 	bool on;
 
-	fbtft_par_dbg(DEBUG_BACKLIGHT, par,
-		      "%s: power=%d, fb_blank=%d\n",
-		      __func__, bd->props.power, bd->props.fb_blank);
+	fbtft_par_dbg(DEBUG_BACKLIGHT, par, "%s: power=%d\n", __func__, bd->props.power);
 
 	on = !backlight_is_blank(bd);
 	/* Onboard backlight connected to GPIO0 on SSD1351, GPIO1 unused */
drivers/staging/fbtft/fbtft-core.c +2 -3
index 3626f429b002c..5ca150c409c3c 100644
@@ -133,9 +133,8 @@ static int fbtft_backlight_update_status(struct backlight_device *bd)
 	struct fbtft_par *par = bl_get_data(bd);
 	bool polarity = par->polarity;
 
-	fbtft_par_dbg(DEBUG_BACKLIGHT, par,
-		      "%s: polarity=%d, power=%d, fb_blank=%d\n",
-		      __func__, polarity, bd->props.power, bd->props.fb_blank);
+	fbtft_par_dbg(DEBUG_BACKLIGHT, par, "%s: polarity=%d, power=%d\n", __func__,
+		      polarity, bd->props.power);
 
 	if (!backlight_is_blank(bd))
 		gpiod_set_value(par->gpio.led[0], polarity);
Signature · 1 line
2.44.0
#8 lore raw

PATCH v2 6/6 backlight: Remove fb_blank from struct backlight_properties

In reply to Thomas Zimmermann

Remove the field fb_blank from struct backlight_properties and remove all code that still sets or reads it. Backlight blank status is now tracked exclusively in struct backlight_properties.state.

The core backlight code keeps the fb_blank and state fields in sync, but doesn't do anything else with fb_blank. Several drivers initialize fb_blank to FB_BLANK_UNBLANK to enable the backlight. This is already the default for the state field. So we can delete the fb_blank code from core and drivers and rely on the state field.

---
 drivers/video/backlight/backlight.c           |  2 --
 drivers/video/backlight/mp3309c.c             |  1 -
 drivers/video/backlight/omap1_bl.c            |  1 -
 drivers/video/fbdev/atmel_lcdfb.c             |  1 -
 .../omap2/omapfb/displays/panel-dsi-cm.c      |  1 -
 .../omapfb/displays/panel-sony-acx565akm.c    |  1 -
 include/linux/backlight.h                     | 25 +------------------
 7 files changed, 1 insertion(+), 31 deletions(-)
drivers/video/backlight/backlight.c +0 -2
index 86e1cdc8e3697..691f1f3030e98 100644
@@ -118,14 +118,12 @@ static int fb_notifier_callback(struct notifier_block *self,
 		bd->fb_bl_on[node] = true;
 		if (!bd->use_count++) {
 			bd->props.state &= ~BL_CORE_FBBLANK;
-			bd->props.fb_blank = FB_BLANK_UNBLANK;
 			backlight_update_status(bd);
 		}
 	} else if (fb_blank != FB_BLANK_UNBLANK && bd->fb_bl_on[node]) {
 		bd->fb_bl_on[node] = false;
 		if (!(--bd->use_count)) {
 			bd->props.state |= BL_CORE_FBBLANK;
-			bd->props.fb_blank = fb_blank;
 			backlight_update_status(bd);
 		}
 	}
drivers/video/backlight/mp3309c.c +0 -1
index 34d71259fac1d..059f4ddbbc842 100644
@@ -378,7 +378,6 @@ static int mp3309c_probe(struct i2c_client *client)
 	props.scale = BACKLIGHT_SCALE_LINEAR;
 	props.type = BACKLIGHT_RAW;
 	props.power = FB_BLANK_UNBLANK;
-	props.fb_blank = FB_BLANK_UNBLANK;
 	chip->bl = devm_backlight_device_register(chip->dev, "mp3309c",
 						  chip->dev, chip,
 						  &mp3309c_bl_ops, &props);
drivers/video/backlight/omap1_bl.c +0 -1
index 636b390f78f04..e461e19231ae3 100644
@@ -139,7 +139,6 @@ static int omapbl_probe(struct platform_device *pdev)
 
 	omap_cfg_reg(PWL);	/* Conflicts with UART3 */
 
-	dev->props.fb_blank = FB_BLANK_UNBLANK;
 	dev->props.brightness = pdata->default_intensity;
 	omapbl_update_status(dev);
 
drivers/video/fbdev/atmel_lcdfb.c +0 -1
index 9e391e5eaf9da..5574fb0361ee3 100644
@@ -153,7 +153,6 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo)
 	sinfo->backlight = bl;
 
 	bl->props.power = FB_BLANK_UNBLANK;
-	bl->props.fb_blank = FB_BLANK_UNBLANK;
 	bl->props.brightness = atmel_bl_get_brightness(bl);
 }
 
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +0 -1
index 47683a6c00767..274bdf7b3b459 100644
@@ -1215,7 +1215,6 @@ static int dsicm_probe(struct platform_device *pdev)
 
 		ddata->bldev = bldev;
 
-		bldev->props.fb_blank = FB_BLANK_UNBLANK;
 		bldev->props.power = FB_BLANK_UNBLANK;
 		bldev->props.brightness = 255;
 
drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c +0 -1
index 9d3ce234a7874..71d2e015960c7 100644
@@ -753,7 +753,6 @@ static int acx565akm_probe(struct spi_device *spi)
 	}
 
 	memset(&props, 0, sizeof(props));
-	props.fb_blank = FB_BLANK_UNBLANK;
 	props.power = FB_BLANK_UNBLANK;
 	props.type = BACKLIGHT_RAW;
 
include/linux/backlight.h +1 -24
index 614653e07e3a8..31600b144d794 100644
@@ -218,25 +218,6 @@ struct backlight_properties {
 	 */
 	int power;
 
-	/**
-	 * @fb_blank: The power state from the FBIOBLANK ioctl.
-	 *
-	 * When the FBIOBLANK ioctl is called @fb_blank is set to the
-	 * blank parameter and the update_status() operation is called.
-	 *
-	 * When the backlight device is enabled @fb_blank is set
-	 * to FB_BLANK_UNBLANK. When the backlight device is disabled
-	 * @fb_blank is set to FB_BLANK_POWERDOWN.
-	 *
-	 * Backlight drivers should avoid using this property. It has been
-	 * replaced by state & BL_CORE_FBLANK (although most drivers should
-	 * use backlight_is_blank() as the preferred means to get the blank
-	 * state).
-	 *
-	 * fb_blank is deprecated and will be removed.
-	 */
-	int fb_blank;
-
 	/**
 	 * @type: The type of backlight supported.
 	 *
@@ -366,7 +347,6 @@ static inline int backlight_enable(struct backlight_device *bd)
 		return 0;
 
 	bd->props.power = FB_BLANK_UNBLANK;
-	bd->props.fb_blank = FB_BLANK_UNBLANK;
 	bd->props.state &= ~BL_CORE_FBBLANK;
 
 	return backlight_update_status(bd);
@@ -382,7 +362,6 @@ static inline int backlight_disable(struct backlight_device *bd)
 		return 0;
 
 	bd->props.power = FB_BLANK_POWERDOWN;
-	bd->props.fb_blank = FB_BLANK_POWERDOWN;
 	bd->props.state |= BL_CORE_FBBLANK;
 
 	return backlight_update_status(bd);
@@ -395,15 +374,13 @@ static inline int backlight_disable(struct backlight_device *bd)
  * Display is expected to be blank if any of these is true::
  *
  *   1) if power in not UNBLANK
- *   2) if fb_blank is not UNBLANK
- *   3) if state indicate BLANK or SUSPENDED
+ *   2) if state indicate BLANK or SUSPENDED
  *
  * Returns true if display is expected to be blank, false otherwise.
  */
 static inline bool backlight_is_blank(const struct backlight_device *bd)
 {
 	return bd->props.power != FB_BLANK_UNBLANK ||
-	       bd->props.fb_blank != FB_BLANK_UNBLANK ||
 	       bd->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK);
 }
 
Signature · 1 line
2.44.0
maintainer
#9 lore raw

RE: [PATCH v2 6/6] backlight: Remove fb_blank from struct backlight_properties

Hi Thomas,

...

Quoted 10 lines

Remove the field fb_blank from struct backlight_properties and remove all code that still sets or reads it. Backlight blank status is now tracked exclusively in struct backlight_properties.state.

The core backlight code keeps the fb_blank and state fields in sync, but doesn't do anything else with fb_blank. Several drivers initialize fb_blank to FB_BLANK_UNBLANK to enable the backlight. This is already the default for the state field. So we can delete the fb_blank code from core and drivers and rely on the state field.

Quoted 8 lines

...

Can you explain what are the differences between the version 1 and version 2 of the patch? Thanks,
Flavio

#10 lore raw

Re: [PATCH v2 6/6] backlight: Remove fb_blank from struct backlight_properties

Hi

Am 20.03.24 um 09:46 schrieb FLAVIO SULIGOI:

Quoted 21 lines

Hi Thomas,

...

Quoted 10 lines

Remove the field fb_blank from struct backlight_properties and remove all code that still sets or reads it. Backlight blank status is now tracked exclusively in struct backlight_properties.state.

The core backlight code keeps the fb_blank and state fields in sync, but doesn't do anything else with fb_blank. Several drivers initialize fb_blank to FB_BLANK_UNBLANK to enable the backlight. This is already the default for the state field. So we can delete the fb_blank code from core and drivers and rely on the state field.

Quoted 8 lines
Quoted 3 lines

...

Can you explain what are the differences between the version 1 and version 2 of the patch?

There are none. It's simply labeled v2 because it is part of the version 2 of this series.

Best regards
Thomas

Quoted 2 lines

Thanks,
Flavio

Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
maintainer
#11 lore raw

RE: EXTERNAL: Re: [PATCH v2 6/6] backlight: Remove fb_blank from struct backlight_properties

HI Thomas,

...

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

Remove the field fb_blank from struct backlight_properties and remove all code that still sets or reads it. Backlight blank status is now tracked exclusively in struct backlight_properties.state.

The core backlight code keeps the fb_blank and state fields in sync, but doesn't do anything else with fb_blank. Several drivers initialize fb_blank to FB_BLANK_UNBLANK to enable the backlight. This is already the default for the state field. So we can delete the fb_blank code from core and drivers and rely on the state field.

Quoted 7 lines
Quoted 3 lines

...

Can you explain what are the differences between the version 1 and version

2 of the patch?

There are none. It's simply labeled v2 because it is part of the version 2 of this series.

...

Ah, ok. Sorry for my question, but having received only this email from the series, I didn't understand why version two.
It's all clear now!

Best regards,
Flavio

maintainer
#12 lore raw
In reply to Thomas Zimmermann
Quoted 21 lines · Thomas Zimmermann

The field fb_blank in struct backlight_properties has been marked for removal. Remove it in favor of the power and state fields.

Patches 1 to 5 prepare several backlight drivers. They remove fb_blank or replace driver code with existing helpers.

Patch 6 removes fb_blank from backlight core and drivers. This resolves another dependency between backlight nad fbdev.

v2:
- omap1: replace 'power' with 'enable'
- clarify commit messages

Thomas Zimmermann (6):
auxdisplay: ht16k33: Replace use of fb_blank with backlight helper
backlight: omap1: Remove unused struct omap_backlight_config.set_power
backlight: omap1: Replace FB_BLANK_ states with simple on/off
fbdev: omap2/omapfb: Replace use of fb_blank with backlight helpers
staging: fbtft: Remove reference to fb_blank
backlight: Remove fb_blank from struct backlight_properties

Quoted 12 lines
 drivers/auxdisplay/ht16k33.c                  |  7 +--
 drivers/staging/fbtft/fb_ssd1351.c            |  4 +-
 drivers/staging/fbtft/fbtft-core.c            |  5 +-
 drivers/video/backlight/backlight.c           |  2 -
 drivers/video/backlight/mp3309c.c             |  1 -
 drivers/video/backlight/omap1_bl.c            | 47 +++++++------------
 drivers/video/fbdev/atmel_lcdfb.c             |  1 -
 .../omap2/omapfb/displays/panel-dsi-cm.c      |  7 +--
 .../omapfb/displays/panel-sony-acx565akm.c    | 10 +---
 include/linux/backlight.h                     | 25 +---------
 include/linux/platform_data/omap1_bl.h        |  1 -
 11 files changed, 26 insertions(+), 84 deletions(-)

Is everyone okay with this being pushed through Backlight?

I can send out a PR to an immutable branch for others to pull from.

Signature · 1 line
Lee Jones [李琼斯]
maintainer Applied
#13 lore raw
In reply to Thomas Zimmermann
Quoted 10 lines · Thomas Zimmermann

The field fb_blank in struct backlight_properties has been marked for removal. Remove it in favor of the power and state fields.

Patches 1 to 5 prepare several backlight drivers. They remove fb_blank or replace driver code with existing helpers.

Patch 6 removes fb_blank from backlight core and drivers. This resolves another dependency between backlight nad fbdev.

[...]

Applied, thanks!

[1/6] auxdisplay: ht16k33: Replace use of fb_blank with backlight helper

      commit: 7f17d16ea8b470e068bf53835bf05a995bc445db
[2/6] backlight: omap1: Remove unused struct omap_backlight_config.set_power
      commit: 06239b0914ad09e3f051f5f36280206f09533622
[3/6] backlight: omap1: Replace FB_BLANK_ states with simple on/off
      commit: c42cf539bed201cb774c65b8963faf7aaf5633f7
[4/6] fbdev: omap2/omapfb: Replace use of fb_blank with backlight helpers
      commit: fa10b6597b12a384357f422bb160d2833d2bba22
[5/6] staging: fbtft: Remove reference to fb_blank
      commit: d126df04320d4d82bc85273b8af89ea0a22565d3
[6/6] backlight: Remove fb_blank from struct backlight_properties
      commit: 95342cdb3f438d378f48e4db188aa217b9b0a66e

--
Lee Jones [李琼斯]

maintainer
#14 lore raw
Quoted 15 lines · Lee Jones
Quoted 10 lines · Thomas Zimmermann

The field fb_blank in struct backlight_properties has been marked for removal. Remove it in favor of the power and state fields.

Patches 1 to 5 prepare several backlight drivers. They remove fb_blank or replace driver code with existing helpers.

Patch 6 removes fb_blank from backlight core and drivers. This resolves another dependency between backlight nad fbdev.

[...]

Applied, thanks!

[1/6] auxdisplay: ht16k33: Replace use of fb_blank with backlight helper

Quoted 11 lines
      commit: 7f17d16ea8b470e068bf53835bf05a995bc445db
[2/6] backlight: omap1: Remove unused struct omap_backlight_config.set_power
      commit: 06239b0914ad09e3f051f5f36280206f09533622
[3/6] backlight: omap1: Replace FB_BLANK_ states with simple on/off
      commit: c42cf539bed201cb774c65b8963faf7aaf5633f7
[4/6] fbdev: omap2/omapfb: Replace use of fb_blank with backlight helpers
      commit: fa10b6597b12a384357f422bb160d2833d2bba22
[5/6] staging: fbtft: Remove reference to fb_blank
      commit: d126df04320d4d82bc85273b8af89ea0a22565d3
[6/6] backlight: Remove fb_blank from struct backlight_properties
      commit: 95342cdb3f438d378f48e4db188aa217b9b0a66e

Sent for build testing. I'll report back once complete.

Signature · 1 line
Lee Jones [李琼斯]
maintainer
#15 lore raw

[GIT PULL] Immutable branch between MFD, Auxdisplay, Staging, fbdev and OMAP due for the v6.9 merge window

In reply to Thomas Zimmermann

Enjoy!

The following changes since commit 4cece764965020c22cff7665b18a012006359095:

Linux 6.9-rc1 (2024-03-24 14:10:05 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git ib-backlight-auxdisplay-staging-omap-v6.9

for you to fetch changes up to 4551978bb50a8d59b49629deebacd73478a8b1e1:

backlight: Remove fb_blank from struct backlight_properties (2024-03-28 10:16:26 +0000)

----------------------------------------------------------------
Immutable branch between MFD, Auxdisplay, Staging, fbdev and OMAP due for the v6.9 merge window

----------------------------------------------------------------
Thomas Zimmermann (6):
auxdisplay: ht16k33: Replace use of fb_blank with backlight helper
backlight: omap1: Remove unused struct omap_backlight_config.set_power
backlight: omap1: Replace FB_BLANK_ states with simple on/off
fbdev: omap2/omapfb: Replace use of fb_blank with backlight helpers
staging: fbtft: Remove reference to fb_blank
backlight: Remove fb_blank from struct backlight_properties

 drivers/auxdisplay/ht16k33.c                       |  7 +---
 drivers/staging/fbtft/fb_ssd1351.c                 |  4 +-
 drivers/staging/fbtft/fbtft-core.c                 |  5 +--
 drivers/video/backlight/backlight.c                |  2 -
 drivers/video/backlight/mp3309c.c                  |  1 -
 drivers/video/backlight/omap1_bl.c                 | 47 +++++++++-------------
 drivers/video/fbdev/atmel_lcdfb.c                  |  1 -
 .../fbdev/omap2/omapfb/displays/panel-dsi-cm.c     |  7 +---
 .../omap2/omapfb/displays/panel-sony-acx565akm.c   | 10 +----
 include/linux/backlight.h                          | 25 +-----------
 include/linux/platform_data/omap1_bl.h             |  1 -
 11 files changed, 26 insertions(+), 84 deletions(-)
Signature · 1 line
Lee Jones [李琼斯]