From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6C21C433DB for ; Thu, 4 Feb 2021 14:58:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81B7A64F64 for ; Thu, 4 Feb 2021 14:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236980AbhBDO6J (ORCPT ); Thu, 4 Feb 2021 09:58:09 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:44518 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236982AbhBDOzp (ORCPT ); Thu, 4 Feb 2021 09:55:45 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id E525A1C0B79; Thu, 4 Feb 2021 15:55:03 +0100 (CET) Date: Thu, 4 Feb 2021 15:55:03 +0100 From: Pavel Machek To: Sven Schuchmann Cc: Dan Murphy , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/4] leds: lp50xx: add setting of default intensity from DT Message-ID: <20210204145503.GD14305@duo.ucw.cz> References: <20210204143803.28140-1-schuchmann@schleissheimer.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5gxpn/Q6ypwruk0T" Content-Disposition: inline In-Reply-To: <20210204143803.28140-1-schuchmann@schleissheimer.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --5gxpn/Q6ypwruk0T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2021-02-04 14:38:03, Sven Schuchmann wrote: > In order to use a multicolor-led together with a trigger > the led needs to have an intensity set to see something. > The trigger changes the brightness of the led but if there > is no intensity we actually see nothing. >=20 > This patch adds the ability to set the default intensity > of each multi-led node so that it is turned on from DT. > If no intensity is given the led will be initialized > with full intensity. > Signed-off-by: Sven Schuchmann Check your email headers, empty To: is strange. > diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c > index 79bc071c31fb..e8aa36c7e963 100644 > --- a/drivers/leds/leds-lp50xx.c > +++ b/drivers/leds/leds-lp50xx.c > @@ -504,6 +504,24 @@ static int lp50xx_probe_dt(struct lp50xx *priv) > num_colors++; > } > =20 > + if (fwnode_property_count_u32(child, "default-intensity") > + =3D=3D num_colors) { > + > + int j, def_int[LP50XX_LEDS_PER_MODULE]; No need for empty line? > + ret =3D fwnode_property_read_u32_array(child, > + "default-intensity", def_int, num_colors); > + if (ret) { > + dev_err(&priv->client->dev, > + "Cannot read default-intensity: %d\n", > + ret); > + goto child_out; > + } Just ignore such error? Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --5gxpn/Q6ypwruk0T Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYBwKxwAKCRAw5/Bqldv6 8n4kAKDArF1ccOZdvNpMwNbEL7cmt6eTogCgh7RMntmvmdIaLF3NfqXaQYziIWA= =9Ern -----END PGP SIGNATURE----- --5gxpn/Q6ypwruk0T--