Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp28715ybv; Wed, 19 Feb 2020 15:45:09 -0800 (PST) X-Google-Smtp-Source: APXvYqznnmBF/Uxt2d2UaA/FNnCdVbv2RT4BIBwAIejQ635MMxgE/AlKNnX2Os4I4sZSk/EZAGa0 X-Received: by 2002:a54:4011:: with SMTP id x17mr125306oie.35.1582155908967; Wed, 19 Feb 2020 15:45:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582155908; cv=none; d=google.com; s=arc-20160816; b=q4cLqz20Bgue04ydCHon24tVl25gr9aKTzvkEFDrChNKTtAMwI7JXNS7FYI5Qyrbb+ uO+zRFMsHe09Z7osineNVHFvk24WjMH0sNGN/BtCGrgZi0IGzOAiKT/qCaQrK8KwnzNw ME3vmsAKYovsGvOAje1ALRBuKleJ+HURLR9Y69gxTQMDPrCRS9CMlY98Z1A2YzBMBexq s7mwpRqaZy0n2hG/dlcmWUDPMEKlN0fMKUyaBHMfJcE+QSbp14w2iCPrbVYaKClVtLEX HsleZly6tl1leXkzem7a75OCjP8ZFimSqHzXXGzT2uM0z3+ZXhuaL8V0nDgrCW/WJR/U gBog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=yjyo91KhkhQVrU3B4mmLuk+jb13G7j9BIwgc3lf8Bkc=; b=ixICz4srhe9CQBy/lW5ftmXHVxFx4bzaRJWP138z6vWptRmAt6u2suSj3SXg7R4DYr ew5wyAtV70v06OdFpZ2F6EtNP0h7X6Ipda0LKSCVlthA8kYP3qrSIaqRxZEiltSBOy4H B5bYgBvkNmQMlACf3LBF3FrWJaOrVztB4mA/0TH5ufI/+mCG1LFadQz5wOl69rrblLn/ aofDwJW5vT2hil4qSYl0bPmgWhUYb7h2/sfXZ2et9TkXHyp4iqp8JISn1S5x22mUMC7p yYYrbwJgp0GRULhJ0SpfK0mzlYlfdtfwNjFlt8T53VxcqZniBm8pqht8RwdppN5aOSL/ jORA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YkgX4bsY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si692731otk.154.2020.02.19.15.44.56; Wed, 19 Feb 2020 15:45:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YkgX4bsY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726789AbgBSXom (ORCPT + 99 others); Wed, 19 Feb 2020 18:44:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:48530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726680AbgBSXol (ORCPT ); Wed, 19 Feb 2020 18:44:41 -0500 Received: from earth.universe (unknown [185.62.205.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D9C121D56; Wed, 19 Feb 2020 23:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582155880; bh=7Jwhbeg3NW/b7zKtfeleuO14hiDLfK4BEl3N5Su5gl0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YkgX4bsYvHWMHYmBlyWxpFjKPR5cu4hbzmx05i0+WxrgHrLwOqK2Pj/2gdcEAE/2s hH9P/IYxdRmjObD7kcM/CQGwLQGobex69sien3T4gjCaKZT7rQ0tIpUUffIlvYz3lq N4taBPjSJ+DWFu6LgL/rN5LuZICRM1PbvtWuhz/o= Received: by earth.universe (Postfix, from userid 1000) id A16013C0C83; Thu, 20 Feb 2020 00:44:37 +0100 (CET) Date: Thu, 20 Feb 2020 00:44:37 +0100 From: Sebastian Reichel To: Tony Lindgren Cc: Pavel Machek , Lee Jones , kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org, martin_rysavy@centrum.cz, agx@sigxcpu.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, dri-devel@lists.freedesktop.org, tomi.valkeinen@ti.com, jjhiblot@ti.com Subject: Re: [PATCH] backlight: add led-backlight driver Message-ID: <20200219234437.l6ac7usebu7rnzsy@earth.universe> References: <20200219191412.GA15905@amd> <20200219194540.GD37466@atomide.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n6ehadolgogdw3bm" Content-Disposition: inline In-Reply-To: <20200219194540.GD37466@atomide.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --n6ehadolgogdw3bm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 19, 2020 at 11:45:40AM -0800, Tony Lindgren wrote: > * Pavel Machek [200219 19:15]: > > From: Tomi Valkeinen > >=20 > > This patch adds a led-backlight driver (led_bl), which is similar to > > pwm_bl except the driver uses a LED class driver to adjust the > > brightness in the HW. Multiple LEDs can be used for a single backlight. > >=20 > > Signed-off-by: Tomi Valkeinen > > Signed-off-by: Jean-Jacques Hiblot > > Acked-by: Pavel Machek > > Reviewed-by: Daniel Thompson > > Acked-by: Lee Jones > > Acked-by: Tony Lindgren > > Tested-by: Tony Lindgren > > Signed-off-by: Pavel Machek > > --- > > drivers/video/backlight/Kconfig | 7 ++ > > drivers/video/backlight/Makefile | 1 + > > drivers/video/backlight/led_bl.c | 260 +++++++++++++++++++++++++++++++= ++++++++ > > 3 files changed, 268 insertions(+) > > create mode 100644 drivers/video/backlight/led_bl.c > >=20 > > Hi! > >=20 > > Here's the version of the driver I have. AFAICT > > default-brightness-level handling is ok, so does not need to be > > changed. > >=20 > > Lee, it would be easiest for me if you could apply it to your tree and > > push, but given enough time I can push it to Linus, too. >=20 > Oh you're using quoted-printable for patches.. Got it applied now, > and it still works. Below is also the related dts change that > I tested with. >=20 > Feel free to pick the dts change too, naturally that should > not be applied before the driver. >=20 > If you guys instead want me to pick these both into my fixes > branch, just let me know and I'll do the explaining why these > are needed as fixes. Basically we no longer have a way to enable > the LCD backlight for droid4 manually starting with v5.6-rc1 > unlike earlier. >=20 > Regards, >=20 > Tony >=20 > 8< ------------------ > From tony Mon Sep 17 00:00:00 2001 > From: Tony Lindgren > Date: Wed, 19 Feb 2020 11:25:27 -0800 > Subject: [PATCH] ARM: dts: droid4: Configure LED backlight for lm3532 >=20 > With the LED backlight changes merged, we still need the dts configured > to have backlight working for droid4. Based on an earlier patch from > Pavel Machek , let's configure the backlight but update > the value range to be more usable. >=20 > We have a range of 256 register values split into 8 steps, so we can > generate the brightness levels backwards with: >=20 > $ for i in 0 1 2 3 4 5 6 7; do echo "255 - ${i} * (256 / 8)" | bc; done >=20 > To avoid more confusion why the LCD backlight is still not on, let's > also enable LED backlight as a loadable module for omap2plus_defconfig. >=20 > Cc: Merlijn Wajer > Cc: Pavel Machek > Signed-off-by: Tony Lindgren > --- > arch/arm/boot/dts/motorola-mapphone-common.dtsi | 13 +++++++++++-- > arch/arm/configs/omap2plus_defconfig | 1 + > 2 files changed, 12 insertions(+), 2 deletions(-) >=20 > diff --git a/arch/arm/boot/dts/motorola-mapphone-common.dtsi b/arch/arm/b= oot/dts/motorola-mapphone-common.dtsi > --- a/arch/arm/boot/dts/motorola-mapphone-common.dtsi > +++ b/arch/arm/boot/dts/motorola-mapphone-common.dtsi > @@ -182,6 +182,14 @@ vibrator { > pwm-names =3D "enable", "direction"; > direction-duty-cycle-ns =3D <10000000>; > }; > + > + backlight: backlight { > + compatible =3D "led-backlight"; > + > + leds =3D <&backlight_led>; > + brightness-levels =3D <31 63 95 127 159 191 223 255>; > + default-brightness-level =3D <6>; > + }; > }; > =20 > &dss { > @@ -205,6 +213,8 @@ lcd0: display { > vddi-supply =3D <&lcd_regulator>; > reset-gpios =3D <&gpio4 5 GPIO_ACTIVE_HIGH>; /* gpio101 */ > =20 > + backlight =3D <&backlight>; > + > width-mm =3D <50>; > height-mm =3D <89>; > =20 > @@ -393,12 +403,11 @@ led-controller@38 { > ramp-up-us =3D <1024>; > ramp-down-us =3D <8193>; > =20 > - led@0 { > + backlight_led: led@0 { > reg =3D <0>; > led-sources =3D <2>; > ti,led-mode =3D <0>; > label =3D ":backlight"; > - linux,default-trigger =3D "backlight"; > }; > =20 > led@1 { > diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap= 2plus_defconfig > --- a/arch/arm/configs/omap2plus_defconfig > +++ b/arch/arm/configs/omap2plus_defconfig > @@ -375,6 +375,7 @@ CONFIG_BACKLIGHT_GENERIC=3Dm > CONFIG_BACKLIGHT_PWM=3Dm > CONFIG_BACKLIGHT_PANDORA=3Dm > CONFIG_BACKLIGHT_GPIO=3Dm > +CONFIG_BACKLIGHT_LED=3Dm > CONFIG_FRAMEBUFFER_CONSOLE=3Dy > CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=3Dy > CONFIG_LOGO=3Dy Finally :) Reviewed-by: Sebastian Reichel -- Sebastian --n6ehadolgogdw3bm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAl5NyFcACgkQ2O7X88g7 +pr98Q/+JkurT+hW4mT1GQB8xFAJUfN0+tfx9gqKE2NeSjDY+IsZL0qQZOueskzl k139MC29XV8DRDjX2xjOXhitc24UeCyoqwCKQsECpZ1ihpJtZyl985HVndgTwCC4 kA6FCjp1Pb4VY0gUwheILkGFZSEMJzQK7++mgeOy1xUsKx8iZhrvTfkkG3dNoTck 3dC6HgheQkr6QxL6yyF1yQqyaqwJPqo5zpkNTlyNgjoj8nynRnUfFx84Y2OYDBBM 8bdmMi1hlPQQttBHbQiO0ztkaZQy8QJFKoiTf5bIn5Kus9NJSZiSQjSzoR3L9ltD U588aumKE7WKO9qClZh0f/CV1FFBH6eewN9wMFk977q9mj1+O2vf4ljvic8+qLMz 6hK+Di9WpBvK8YEpu+4f4vtJyafzugoi/+xPQa/M2au0Ifs3tXqstyZ6MxbpYCPs wYMD8c8rcynS6KXhMZLTKdVSS20DnOXMYM7+4o7nq++kE8Pq6hHy0mJdy1YXvfij YDWFovSU+5E2/4i5+v/r3VuCpfL8EY/49kXU/UsDVPTTEbZlysCWoPeJMrmgIBGo OXLHVaY4KjJLxaMQ1/ixiiiYU/3X+d4eiDjN6P/L5cesP1O5FMePAYNPUX/FP5Xo XRqBsnAyQtmADxHklBlbGMmgyb37MYi/Z5QSa1sS1Up0a9JMiZ0= =ErQY -----END PGP SIGNATURE----- --n6ehadolgogdw3bm--