Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1652260 > unrolled thread

Re: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for Lichee Pi Zero LCD

Started byMaxime Ripard <maxime.ripard@free-electrons.com>
First post2017-05-29 09:50 +0200
Last post2017-05-29 11:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for  Lichee Pi Zero LCD Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-29 09:50 +0200
    Re: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for Lichee  Pi Zero LCD Chen-Yu Tsai <wens@csie.org> - 2017-05-29 10:20 +0200
      Re: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for  Lichee Pi Zero LCD Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-05-29 11:30 +0200

#1652260 — Re: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for Lichee Pi Zero LCD

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2017-05-29 09:50 +0200
SubjectRe: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for Lichee Pi Zero LCD
Message-ID<tMnB8-56h-15@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi,

On Wed, May 24, 2017 at 08:13:20PM +0800, Icenowy Zheng wrote:
> The 40-pin LCD connector on Lichee Pi Zero has backlight pins, which is
> controlled by the PWM0 controller of the V3s SoC, and the controlling
> part is on the board.
> 
> Add the PWM and backlight device nodes in the device tree file, but
> leave them disabled, as they can only be useful when the LCD is
> attached. The LCD device tree overlay files can enable these controllers
> and make use of them.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
> index 387fc2aa546d..e0721bf725d1 100644
> --- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
> @@ -52,6 +52,14 @@
>  		serial0 = &uart0;
>  	};
>  
> +	backlight: backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&pwm 0 50000 0>;
> +		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;

This is unlikely, the perceived brightness by the human eye is not
linear, and is actually much closer to a logarithmic function, which
means you should have use an exponential function here in order to
appear that your brightness increase is linear.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [next] | [standalone]


#1652274 — Re: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for Lichee Pi Zero LCD

FromChen-Yu Tsai <wens@csie.org>
Date2017-05-29 10:20 +0200
SubjectRe: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for Lichee Pi Zero LCD
Message-ID<tMo49-5yh-7@gated-at.bofh.it>
In reply to#1652260
On Mon, May 29, 2017 at 3:41 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Wed, May 24, 2017 at 08:13:20PM +0800, Icenowy Zheng wrote:
>> The 40-pin LCD connector on Lichee Pi Zero has backlight pins, which is
>> controlled by the PWM0 controller of the V3s SoC, and the controlling
>> part is on the board.
>>
>> Add the PWM and backlight device nodes in the device tree file, but
>> leave them disabled, as they can only be useful when the LCD is
>> attached. The LCD device tree overlay files can enable these controllers
>> and make use of them.
>>
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> ---
>>  arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
>> index 387fc2aa546d..e0721bf725d1 100644
>> --- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
>> +++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
>> @@ -52,6 +52,14 @@
>>               serial0 = &uart0;
>>       };
>>
>> +     backlight: backlight {
>> +             compatible = "pwm-backlight";
>> +             pwms = <&pwm 0 50000 0>;
>> +             brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
>
> This is unlikely, the perceived brightness by the human eye is not
> linear, and is actually much closer to a logarithmic function, which
> means you should have use an exponential function here in order to
> appear that your brightness increase is linear.

I think the backlight is a functional part of the panel. It probably
belongs in the panel's overlay.

ChenYu

[toc] | [prev] | [next] | [standalone]


#1652366

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2017-05-29 11:30 +0200
Message-ID<tMp9V-6ft-37@gated-at.bofh.it>
In reply to#1652274

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 29, 2017 at 04:16:51PM +0800, Chen-Yu Tsai wrote:
> On Mon, May 29, 2017 at 3:41 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > Hi,
> >
> > On Wed, May 24, 2017 at 08:13:20PM +0800, Icenowy Zheng wrote:
> >> The 40-pin LCD connector on Lichee Pi Zero has backlight pins, which is
> >> controlled by the PWM0 controller of the V3s SoC, and the controlling
> >> part is on the board.
> >>
> >> Add the PWM and backlight device nodes in the device tree file, but
> >> leave them disabled, as they can only be useful when the LCD is
> >> attached. The LCD device tree overlay files can enable these controllers
> >> and make use of them.
> >>
> >> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> >> ---
> >>  arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts | 14 ++++++++++++++
> >>  1 file changed, 14 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
> >> index 387fc2aa546d..e0721bf725d1 100644
> >> --- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
> >> +++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
> >> @@ -52,6 +52,14 @@
> >>               serial0 = &uart0;
> >>       };
> >>
> >> +     backlight: backlight {
> >> +             compatible = "pwm-backlight";
> >> +             pwms = <&pwm 0 50000 0>;
> >> +             brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
> >
> > This is unlikely, the perceived brightness by the human eye is not
> > linear, and is actually much closer to a logarithmic function, which
> > means you should have use an exponential function here in order to
> > appear that your brightness increase is linear.
> 
> I think the backlight is a functional part of the panel. It probably
> belongs in the panel's overlay.

Yeah, that's also true.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web