Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5277914ybe; Tue, 17 Sep 2019 05:43:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCgf74toRAzY2ZflejKGQVVIAOStpLarcZjtwSVTy+2NZNv95e2F5OEwqSkjJgudV+vN83 X-Received: by 2002:a17:906:4bc7:: with SMTP id x7mr4569766ejv.16.1568724222870; Tue, 17 Sep 2019 05:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568724222; cv=none; d=google.com; s=arc-20160816; b=iTVjfFd4ct/vnU9gfBBvY7ej9IML63YyE67CzvjJr8XXxTDHzk8S4GQD0UUqXUWsW0 O7Fvx06jgMrA1EdrjU9Y1aApMRTxZ9YebZPF/O5fJ1o3+RRu8ZAEx2oGsK6/GNfRtcxz eJS00lhrVWC7Vi7zSouHA7CuU5NRI1MLTk6tda/GLcrMdk7izDIdzZGXMjfieeVSuWQu pK7zDHSZEguTmTMW4EJIJ0kSfigK+2F8iPhUcaTkcWYeRtzf4AhWOAppGPAfMScBzHxV ivZNgtiVpWaXpWE7GcqqRxumPtUWbF3IMjEc1CO6t74VEkk/hXC3GZnGYB8fQQJ3P1jn /Sag== 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=TCeRUD3PXQ140WsmlBR9keExGR6sR1gRhY4DkU6eG9k=; b=gK7UvvpEQY2orcvt2foeSfyUVIZbzNxxvBJMIPL3Vu7CEQC47dVCOCL/RD8KuhVZop obbhc7yQ1MiAXOPREmiKfmQp/cvKS4spIN0xlPjxAhcw1BLQ+H1JOL5s2+KeBmoFki9Y lQD4ovd5F+bfmiuemOtcHD3U1cOUIw4RFKXrFYn7G3Rvv35vE9vEDkACGali9XA2CBCG hJ/4AcSWimaVN210HJ5NIIv3cjx+VVPXo9tPV7UIGxQwEWGsDi8C/tSVb/cyNNMxmYSN xJSBz4Veh6fBEO7ddWoIz1IOYel4+ytnlwzH6omAnCmkf1vdio1/NcGbEXJCuVAlRjeg vhzw== 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 kt5si1016779ejb.283.2019.09.17.05.43.18; Tue, 17 Sep 2019 05:43:42 -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 S1728189AbfIQMkh (ORCPT + 99 others); Tue, 17 Sep 2019 08:40:37 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:60546 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727534AbfIQMkg (ORCPT ); Tue, 17 Sep 2019 08:40:36 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id DDC0B815FC; Tue, 17 Sep 2019 14:40:18 +0200 (CEST) Date: Tue, 17 Sep 2019 14:40:32 +0200 From: Pavel Machek To: Jacek Anaszewski Cc: Tony Lindgren , kernel list , sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org, Dan Murphy , linux-leds@vger.kernel.org Subject: [PATCH] lm3532: right registration to work with LED-backlight Message-ID: <20190917124032.GA27465@amd> References: <20190827215205.59677-1-tony@atomide.com> <20190828085339.GB2923@amd> <20190908080305.GC25459@amd> <390760c1-de39-9328-bb23-cbf791094718@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <390760c1-de39-9328-bb23-cbf791094718@gmail.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 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Use new registration support, which will eventually be needed for proper backlight support. Signed-off-by: Pavel Machek diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c index 0507c65..23f49b6 100644 --- a/drivers/leds/leds-lm3532.c +++ b/drivers/leds/leds-lm3532.c @@ -577,6 +577,12 @@ static int lm3532_parse_node(struct lm3532_data *priv) priv->runtime_ramp_down =3D lm3532_get_ramp_index(ramp_time); =20 device_for_each_child_node(priv->dev, child) { + struct led_init_data idata =3D { + .fwnode =3D child, + .default_label =3D ":", + .devicename =3D priv->client->name, + }; + led =3D &priv->leds[i]; =20 ret =3D fwnode_property_read_u32(child, "reg", &control_bank); @@ -651,7 +657,7 @@ static int lm3532_parse_node(struct lm3532_data *priv) led->led_dev.name =3D led->label; led->led_dev.brightness_set_blocking =3D lm3532_brightness_set; =20 - ret =3D devm_led_classdev_register(priv->dev, &led->led_dev); + ret =3D devm_led_classdev_register_ext(priv->dev, &led->led_dev, &idata); if (ret) { dev_err(&priv->client->dev, "led register err: %d\n", ret); --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl2A1EAACgkQMOfwapXb+vLYdwCfSLlhnzn7hr2yN10xNmOpBaJw Xt0An35whtquNKSSQXbwCZ+T/OSVXTft =zZ8+ -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--