From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750993AbdE2J0o (ORCPT ); Mon, 29 May 2017 05:26:44 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:54763 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844AbdE2J0m (ORCPT ); Mon, 29 May 2017 05:26:42 -0400 Date: Mon, 29 May 2017 11:26:30 +0200 From: Maxime Ripard To: Chen-Yu Tsai Cc: Icenowy Zheng , devicetree , linux-arm-kernel , linux-kernel , linux-sunxi Subject: Re: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for Lichee Pi Zero LCD Message-ID: <20170529092630.z3brclkxoiyeq4ok@flea.lan> References: <20170524121320.4171-1-icenowy@aosc.io> <20170524121320.4171-3-icenowy@aosc.io> <20170529074117.x7pm2k2lbznl2n5j@flea.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dm7um4wnf7r5l3nh" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170428 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --dm7um4wnf7r5l3nh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > 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 controlle= rs > >> and make use of them. > >> > >> Signed-off-by: Icenowy Zheng > >> --- > >> 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 =3D &uart0; > >> }; > >> > >> + backlight: backlight { > >> + compatible =3D "pwm-backlight"; > >> + pwms =3D <&pwm 0 50000 0>; > >> + brightness-levels =3D <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. >=20 > 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 --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --dm7um4wnf7r5l3nh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJZK+lGAAoJEBx+YmzsjxAgwggP/1vCD4kPZ0M0ktyaPrBICCSp SNhrlKy/zs9XfkmtWjeUTkOD3dO0QYasEYvv+RhunyC4nCecIVv3eImET3/odCX9 oX5rrh1+LikUEMgrbdldcMtdV+bghGWezVlO89SHFTBrkKWibvvoiyVEVRX2vJHY au4ima9hhX/gqmv+f5cv3lSdSTNpwzIONF/Pg0Z2oINDwy/8u6ty1wcDme9V4aGR YN8BfsiSiYQ0/N4yNJUFF4XwA3Oxnl35aK5Va1E72I7qGdLTb/fSVeBkV/kvyA2D KDI7IM6XHwKC+ZpZyJuVwdpQrmf7NRrBHez0zR8QAfZmlq7qZtM9WDIGEwIwGRHf RbL1+4M8kDhmjEzobWdtvIYAZQV1V1oGTeptK04lrFginHCNRXU7pR9AdWU9txBB i7QQoDf60q2dV5eiMIPGfuwKzASYXVtKQ8Q2gJKC3iMTdpFrA4VNm069b65dawUg GGVr/7W98mbOtH04qrWVwOsU9+dsujWAmqWb+QNGjjqzAqPu+iT52oXSMN2xgcyT 23xlNnM9V+Ya87boOPp+2D+P9y6I5dYDe3Cw+y8i0R4/PooqAsnrE5OkpiiQHbch 6Cbh/c64GsyV1K6Eh34SY+Ns11VHrA2NRaY72cxi/Xr80ZekPfbkMDrg8CUW39UQ IfdyB8qhmQbUGKBi7qGX =mnEQ -----END PGP SIGNATURE----- --dm7um4wnf7r5l3nh--