* [PATCH v2] backlight: rave-sp: don't touch initial state and register with correct device
@ 2019-07-08 12:41 Lucas Stach
2019-07-09 9:32 ` Daniel Thompson
2019-07-25 12:04 ` Lee Jones
0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2019-07-08 12:41 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han; +Cc: kernel, dri-devel, patchwork-lst
This way the backlight can be referenced through its device node and
enabling/disabling can be managed through the panel driver.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/video/backlight/rave-sp-backlight.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/video/backlight/rave-sp-backlight.c b/drivers/video/backlight/rave-sp-backlight.c
index 462f14a1b19d..05b5f003a3d1 100644
--- a/drivers/video/backlight/rave-sp-backlight.c
+++ b/drivers/video/backlight/rave-sp-backlight.c
@@ -48,14 +48,20 @@ static int rave_sp_backlight_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct backlight_device *bd;
- bd = devm_backlight_device_register(dev, pdev->name, dev->parent,
+ bd = devm_backlight_device_register(dev, pdev->name, dev,
dev_get_drvdata(dev->parent),
&rave_sp_backlight_ops,
&rave_sp_backlight_props);
if (IS_ERR(bd))
return PTR_ERR(bd);
- backlight_update_status(bd);
+ /*
+ * If there is a phandle pointing to the device node we can
+ * assume that another device will manage the status changes.
+ * If not we make sure the backlight is in a consistent state.
+ */
+ if (!dev->of_node->phandle)
+ backlight_update_status(bd);
return 0;
}
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] backlight: rave-sp: don't touch initial state and register with correct device
2019-07-08 12:41 [PATCH v2] backlight: rave-sp: don't touch initial state and register with correct device Lucas Stach
@ 2019-07-09 9:32 ` Daniel Thompson
2019-07-25 12:04 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Thompson @ 2019-07-09 9:32 UTC (permalink / raw)
To: Lucas Stach; +Cc: Jingoo Han, Lee Jones, kernel, dri-devel, patchwork-lst
On Mon, Jul 08, 2019 at 02:41:29PM +0200, Lucas Stach wrote:
> This way the backlight can be referenced through its device node and
> enabling/disabling can be managed through the panel driver.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
> ---
> drivers/video/backlight/rave-sp-backlight.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/backlight/rave-sp-backlight.c b/drivers/video/backlight/rave-sp-backlight.c
> index 462f14a1b19d..05b5f003a3d1 100644
> --- a/drivers/video/backlight/rave-sp-backlight.c
> +++ b/drivers/video/backlight/rave-sp-backlight.c
> @@ -48,14 +48,20 @@ static int rave_sp_backlight_probe(struct platform_device *pdev)
> struct device *dev = &pdev->dev;
> struct backlight_device *bd;
>
> - bd = devm_backlight_device_register(dev, pdev->name, dev->parent,
> + bd = devm_backlight_device_register(dev, pdev->name, dev,
> dev_get_drvdata(dev->parent),
> &rave_sp_backlight_ops,
> &rave_sp_backlight_props);
> if (IS_ERR(bd))
> return PTR_ERR(bd);
>
> - backlight_update_status(bd);
> + /*
> + * If there is a phandle pointing to the device node we can
> + * assume that another device will manage the status changes.
> + * If not we make sure the backlight is in a consistent state.
> + */
> + if (!dev->of_node->phandle)
> + backlight_update_status(bd);
>
> return 0;
> }
> --
> 2.20.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] backlight: rave-sp: don't touch initial state and register with correct device
2019-07-08 12:41 [PATCH v2] backlight: rave-sp: don't touch initial state and register with correct device Lucas Stach
2019-07-09 9:32 ` Daniel Thompson
@ 2019-07-25 12:04 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2019-07-25 12:04 UTC (permalink / raw)
To: Lucas Stach; +Cc: Jingoo Han, Daniel Thompson, kernel, dri-devel, patchwork-lst
On Mon, 08 Jul 2019, Lucas Stach wrote:
> This way the backlight can be referenced through its device node and
> enabling/disabling can be managed through the panel driver.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/video/backlight/rave-sp-backlight.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-25 12:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 12:41 [PATCH v2] backlight: rave-sp: don't touch initial state and register with correct device Lucas Stach
2019-07-09 9:32 ` Daniel Thompson
2019-07-25 12:04 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.