* [PATCH] staging: fbtft: add support for a device tree of backlight.
@ 2025-07-26 0:04 chalianis1
2025-07-26 6:31 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: chalianis1 @ 2025-07-26 0:04 UTC (permalink / raw)
To: andy; +Cc: linux-staging, linux-fbdev, stable, gregkh, Chali Anis
From: Chali Anis <chalianis1@gmail.com>
Support the of backlight from device tree and keep compatibility
for the legacy gpio backlight.
Cc: stable@vger.kernel.org
Signed-off-by: Chali Anis <chalianis1@gmail.com>
---
drivers/staging/fbtft/fbtft-core.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index da9c64152a60..5f0220dbe397 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -170,6 +170,18 @@ void fbtft_register_backlight(struct fbtft_par *par)
struct backlight_device *bd;
struct backlight_properties bl_props = { 0, };
+ bd = devm_of_find_backlight(par->info->device);
+ if (IS_ERR(bd)) {
+ dev_warn(par->info->device,
+ "cannot find of backlight device (%ld), trying legacy\n",
+ PTR_ERR(bd));
+ }
+
+ if (bd) {
+ par->info->bl_dev = bd;
+ return;
+ }
+
if (!par->gpio.led[0]) {
fbtft_par_dbg(DEBUG_BACKLIGHT, par,
"%s(): led pin not set, exiting.\n", __func__);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: fbtft: add support for a device tree of backlight.
2025-07-26 0:04 [PATCH] staging: fbtft: add support for a device tree of backlight chalianis1
@ 2025-07-26 6:31 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2025-07-26 6:31 UTC (permalink / raw)
To: chalianis1; +Cc: andy, linux-staging, linux-fbdev, stable
On Fri, Jul 25, 2025 at 08:04:16PM -0400, chalianis1@gmail.com wrote:
> From: Chali Anis <chalianis1@gmail.com>
>
> Support the of backlight from device tree and keep compatibility
> for the legacy gpio backlight.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Chali Anis <chalianis1@gmail.com>
> ---
> drivers/staging/fbtft/fbtft-core.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index da9c64152a60..5f0220dbe397 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -170,6 +170,18 @@ void fbtft_register_backlight(struct fbtft_par *par)
> struct backlight_device *bd;
> struct backlight_properties bl_props = { 0, };
>
> + bd = devm_of_find_backlight(par->info->device);
> + if (IS_ERR(bd)) {
> + dev_warn(par->info->device,
> + "cannot find of backlight device (%ld), trying legacy\n",
> + PTR_ERR(bd));
So now you are going to get a warning message for a system that
previously did not at all? That's not very nice to those users :(
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-26 6:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-26 0:04 [PATCH] staging: fbtft: add support for a device tree of backlight chalianis1
2025-07-26 6:31 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).