Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp557594ybl; Wed, 28 Aug 2019 01:54:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzQir8XEAfdSK4ZCwyQK1yqoOA29Z7acIBfXsqWA2v7WI5RFsC/yk8eDV1soT5X5C/zO9G X-Received: by 2002:a17:90a:23c5:: with SMTP id g63mr3105733pje.124.1566982489696; Wed, 28 Aug 2019 01:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566982489; cv=none; d=google.com; s=arc-20160816; b=kxrniT1m3Jlzz76tbLG8wLUC6S9RqbxRFGcrrBpPmxnG3bf4538vXRIGcGByOQl3+Y 6OUxc+v172ihcZMZJLdqlGxvt9qspKeKhODT0LdIQo0A8uXPYwCoW5Q1JXMMFYGt+5S9 VzJw2vjeJVfWtKDz/+03Emob6HuVlCiSt0y00TyhQ/NPPh2EwXnhATccpYGWmWz8vkx1 wa+23LW12kqYlCH4FXW34vBpdAoeIA5RRTTSKqFDv0XcBFGpgduSaj0Dg79fI6yDJC+P LfUGxahNWHxewYhUlPi6Kzpk7ql2JW0HIlpuapcEL+XdNxxS845UfVGwiYq2a5oxIFxx nT0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=yTYLTg01SvWpKI6QTABQFuvpsBaHk4DLhoe1mgzNtzY=; b=UQ4/H3KYIVIcNsMQIOxtYP/0rXDS1IXjn4VOqpHHTa3znY0F4JNDFP4cObD2m4Pef4 XLe0keGOgvdXOuGVQGoYs//sDzlAFlI1WQ/dfd1GfcEKP005o8m6pYf2SMcTHRZkZjlf YtdqrEUoqCUFIt8WYaDroNz6M/FJULPsFmxWw9qU6j/P+L/td7OWjHUpGhwvmVn6Fjfq 83BUFtIivutcu3+Jk/9OuTqR1Al6k2t525y2WwrBEWibvayts4VklJikgZNjiYamfQzC 8Z1J7vHJv9/Dz+5BXcse8bnU4Ifj4NCOgrzf8uIUnnYTABN38awE2H0Mk98PuSNHkleF haEA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37si1725378pgz.39.2019.08.28.01.54.33; Wed, 28 Aug 2019 01:54:49 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726436AbfH1Ixm (ORCPT + 99 others); Wed, 28 Aug 2019 04:53:42 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:52922 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726259AbfH1Ixm (ORCPT ); Wed, 28 Aug 2019 04:53:42 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 40846825C1; Wed, 28 Aug 2019 10:53:26 +0200 (CEST) Date: Wed, 28 Aug 2019 10:53:39 +0200 From: Pavel Machek To: Tony Lindgren , kernel list , sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org Cc: Jacek Anaszewski , Dan Murphy , linux-leds@vger.kernel.org Subject: [FYI] lm3532: right registration to work with LED-backlight Message-ID: <20190828085339.GB2923@amd> References: <20190827215205.59677-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/NkBOFFp2J2Af1nK" Content-Disposition: inline In-Reply-To: <20190827215205.59677-1-tony@atomide.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --/NkBOFFp2J2Af1nK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! Eventually, these will be needed. Best regards, Pavel commit 38d956977a7d6cbdc811676f9b4033da7487e045 Author: Pavel Date: Wed Aug 7 12:43:52 2019 +0200 d4: lm3532 needs to use right register function for backlight to work. diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c index 365a22a5..f98e657 100644 --- a/drivers/leds/leds-lm3532.c +++ b/drivers/leds/leds-lm3532.c @@ -629,7 +629,7 @@ static int lm3532_parse_node(struct lm3532_data *priv) =20 lm3532_init_registers(led); =20 - ret =3D devm_led_classdev_register(priv->dev, &led->led_dev); + ret =3D devm_of_led_classdev_register(priv->dev, to_of_node(child), &led= ->led_dev); if (ret) { dev_err(&priv->client->dev, "led register err: %d\n", ret); diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/o= map4-droid4-xt894.dts index 4454449..64abe87 100644 --- a/arch/arm/boot/dts/omap4-droid4-xt894.dts +++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts @@ -185,6 +185,14 @@ pwm-names =3D "enable", "direction"; direction-duty-cycle-ns =3D <10000000>; }; + + backlight: backlight { + compatible =3D "led-backlight"; + + leds =3D <&backlight_led>; + brightness-levels =3D <0 4 8 16 32 64 128 255>; + default-brightness-level =3D <6>; + }; }; =20 &dss { @@ -208,6 +216,8 @@ 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 @@ -389,12 +427,11 @@ 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 { --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --/NkBOFFp2J2Af1nK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl1mQRMACgkQMOfwapXb+vK0hACgtFoq2r7pDwvtVDCnYsULvPVW SPwAoIFNH+S+vjvcv++0lWkyUU92tEma =aEUJ -----END PGP SIGNATURE----- --/NkBOFFp2J2Af1nK--