* [PATCH] backlight: rave-sp: don't touch initial state and register with correct device
@ 2019-04-29 15:29 Lucas Stach
2019-05-02 10:33 ` Daniel Thompson
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2019-04-29 15:29 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han
Cc: linux-fbdev, 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 | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/video/backlight/rave-sp-backlight.c b/drivers/video/backlight/rave-sp-backlight.c
index 462f14a1b19d..d296bfcf4396 100644
--- a/drivers/video/backlight/rave-sp-backlight.c
+++ b/drivers/video/backlight/rave-sp-backlight.c
@@ -48,15 +48,13 @@ 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);
-
return 0;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] backlight: rave-sp: don't touch initial state and register with correct device
2019-04-29 15:29 [PATCH] backlight: rave-sp: don't touch initial state and register with correct device Lucas Stach
@ 2019-05-02 10:33 ` Daniel Thompson
2019-05-02 12:01 ` Lucas Stach
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Thompson @ 2019-05-02 10:33 UTC (permalink / raw)
To: Lucas Stach, Lee Jones, Jingoo Han
Cc: linux-fbdev, kernel, dri-devel, patchwork-lst
On 29/04/2019 16:29, Lucas Stach wrote:
> This way the backlight can be referenced through its device node and
> enabling/disabling can be managed through the panel driver.
Is it possible to implement something similar to
pwm_backlight_initial_power_state() to handle this?
backlight drivers already suffer from too much diversity so I prefer
things like this to align behaviour with the (fairly heavilyly used) PWM
driver if possible.
Daniel.
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/video/backlight/rave-sp-backlight.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/video/backlight/rave-sp-backlight.c b/drivers/video/backlight/rave-sp-backlight.c
> index 462f14a1b19d..d296bfcf4396 100644
> --- a/drivers/video/backlight/rave-sp-backlight.c
> +++ b/drivers/video/backlight/rave-sp-backlight.c
> @@ -48,15 +48,13 @@ 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);
> -
> return 0;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] backlight: rave-sp: don't touch initial state and register with correct device
2019-05-02 10:33 ` Daniel Thompson
@ 2019-05-02 12:01 ` Lucas Stach
2019-05-03 13:29 ` Daniel Thompson
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2019-05-02 12:01 UTC (permalink / raw)
To: Daniel Thompson, Lee Jones, Jingoo Han
Cc: linux-fbdev, kernel, dri-devel, patchwork-lst
Hi Daniel,
Am Donnerstag, den 02.05.2019, 11:33 +0100 schrieb Daniel Thompson:
> On 29/04/2019 16:29, Lucas Stach wrote:
> > This way the backlight can be referenced through its device node and
> > enabling/disabling can be managed through the panel driver.
>
> Is it possible to implement something similar to
> pwm_backlight_initial_power_state() to handle this?
I'm not aware of any protocol to the RAVE-SP that would allow to read
back the backlight state. AFAICS the backlight is implemented as a
unidirectional protocol.
Regards,
Lucas
> backlight drivers already suffer from too much diversity so I prefer
> things like this to align behaviour with the (fairly heavilyly used) PWM
> driver if possible.
>
>
> Daniel.
>
>
> > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> > drivers/video/backlight/rave-sp-backlight.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/video/backlight/rave-sp-backlight.c b/drivers/video/backlight/rave-sp-backlight.c
> > index 462f14a1b19d..d296bfcf4396 100644
> > --- a/drivers/video/backlight/rave-sp-backlight.c
> > +++ b/drivers/video/backlight/rave-sp-backlight.c
> > @@ -48,15 +48,13 @@ 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);
> > -
> > > > return 0;
> > }
> >
> >
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] backlight: rave-sp: don't touch initial state and register with correct device
2019-05-02 12:01 ` Lucas Stach
@ 2019-05-03 13:29 ` Daniel Thompson
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Thompson @ 2019-05-03 13:29 UTC (permalink / raw)
To: Lucas Stach
Cc: linux-fbdev, Jingoo Han, dri-devel, patchwork-lst, kernel,
Lee Jones
On Thu, May 02, 2019 at 02:01:45PM +0200, Lucas Stach wrote:
> Hi Daniel,
>
> Am Donnerstag, den 02.05.2019, 11:33 +0100 schrieb Daniel Thompson:
> > On 29/04/2019 16:29, Lucas Stach wrote:
> > > This way the backlight can be referenced through its device node and
> > > enabling/disabling can be managed through the panel driver.
> >
> > Is it possible to implement something similar to
> > pwm_backlight_initial_power_state() to handle this?
>
> I'm not aware of any protocol to the RAVE-SP that would allow to read
> back the backlight state. AFAICS the backlight is implemented as a
> unidirectional protocol.
That function does two things... one is read the current power state to
ensure meta-data is correctly up to date which cannot be replicated.
The other is to choose different behaviour depending on whether the
backlight is standalone or has a phandle link to another device.
Does the second part apply to the rave-sp?
Daniel.
> > backlight drivers already suffer from too much diversity so I prefer
> > things like this to align behaviour with the (fairly heavilyly used) PWM
> > driver if possible.
> >
> >
> > Daniel.
> >
> >
> > > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > ---
> > > drivers/video/backlight/rave-sp-backlight.c | 4 +---
> > > 1 file changed, 1 insertion(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/video/backlight/rave-sp-backlight.c b/drivers/video/backlight/rave-sp-backlight.c
> > > index 462f14a1b19d..d296bfcf4396 100644
> > > --- a/drivers/video/backlight/rave-sp-backlight.c
> > > +++ b/drivers/video/backlight/rave-sp-backlight.c
> > > @@ -48,15 +48,13 @@ 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);
> > > -
> > > > > return 0;
> > > }
> > >
> > >
> >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-03 13:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-29 15:29 [PATCH] backlight: rave-sp: don't touch initial state and register with correct device Lucas Stach
2019-05-02 10:33 ` Daniel Thompson
2019-05-02 12:01 ` Lucas Stach
2019-05-03 13:29 ` Daniel Thompson
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).