Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5724688imm; Mon, 27 Aug 2018 03:11:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZnSB9M7UMMmibTXqHVh9Z6Ytqbjg/4eB5vXySk+Zwi1s9AVmGDNuSzT9X9qim83TLwJ9Rl X-Received: by 2002:a17:902:724c:: with SMTP id c12-v6mr12392320pll.326.1535364692470; Mon, 27 Aug 2018 03:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535364692; cv=none; d=google.com; s=arc-20160816; b=FzpvHUd3lBY/vpdfgrOIvt6L4fuoh2cNJAI0CZAwjhSexk1zPspy4zJorBp6DS1S/C MaVLZfm5vsumRT3vr7ZPpIxKLpSM1K9lOJlu1G9WYEVeZM1Ge1Vw/f1urpvfCaqg9Q1P Eb8mVDuk6Bu/j5p4iWINzPlalrzL8qpcJNR2/aCv29DJRPZjVIZNAwSqes322L8L9/55 hMsJwaURUi2Qkir6nV8nTn/4woacH4VBkEPQpckNp0Fe5AkJApCeE6qg9oluth6dCX+k iSOx0EPbBO8DvD/qiBTls05JnQQNBaT7yplBxHp7snGxVc94HU01sSdRX/SYFcBBwIw7 MAZg== 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:arc-authentication-results; bh=ANnVRLVe/tuKAy4Pzs6g1VUWz73Xqt8vvdSfF/tcTEk=; b=S3Fq1Ets/zTu4t2MU9lxvqL5KAporzznF7Ix391xr92CTOysS4X/fK/nF8LIa8d5tR X3rQjSpwxnnoUR/e7n+uH9aS3vek0M31P6ZBp/QJNTZYQwgHW3fgbK/CyTxkMl2il5UD 33lVb+MuzX3AdaznOqIXG526fjhieDdRaP7gj9wm2w923bQOfJDWisU5UYqcAUi1Oxby K0N5OV5Z1nCnb5jxDwjatTiMvO9p4t+gK4fhMfQGPLQ0x/nX+qU+YPmp9t5xmz3n659E /Qw9rRvMF/NuQmNESVurkY2DteuGIqQXSZthQYpp1nBWmHQjG9z6iZIApdySfkjdzhtc oNoQ== 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 x23-v6si14444561pfk.25.2018.08.27.03.11.17; Mon, 27 Aug 2018 03:11:32 -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 S1727092AbeH0Nzn (ORCPT + 99 others); Mon, 27 Aug 2018 09:55:43 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33105 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726873AbeH0Nzn (ORCPT ); Mon, 27 Aug 2018 09:55:43 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id B78BA82F70; Mon, 27 Aug 2018 12:09:39 +0200 (CEST) Date: Mon, 27 Aug 2018 12:09:39 +0200 From: Pavel Machek To: Kiran Gunda Cc: bjorn.andersson@linaro.org, jingoohan1@gmail.com, lee.jones@linaro.org, b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, daniel.thompson@linaro.org, jacek.anaszewski@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH V5 5/8] backlight: qcom-wled: Restructure the driver for WLED3 Message-ID: <20180827100939.GG31905@amd> References: <1535106467-17843-1-git-send-email-kgunda@codeaurora.org> <1535106467-17843-6-git-send-email-kgunda@codeaurora.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GdbWtwDHkcXqP16f" Content-Disposition: inline In-Reply-To: <1535106467-17843-6-git-send-email-kgunda@codeaurora.org> 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 --GdbWtwDHkcXqP16f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri 2018-08-24 15:57:44, Kiran Gunda wrote: > Restructure the driver to add the support for new WLED > peripherals. >=20 > Signed-off-by: Kiran Gunda > Acked-by: Daniel Thompson > --- > Changes from V3: > - This is the new patch after splitting the=20 > "backlight: qcom-wled: Add support for WLED4 peripheral" patch > to seperate the WLED3 specific restructure. >=20 > Changes from V4: > - Initialize wled->cfg.enabled_strings to 0,1,2,3. > - Replaced the WLED3 macro with 3. >=20 > drivers/video/backlight/qcom-wled.c | 395 ++++++++++++++++++++++--------= ------ > 1 file changed, 245 insertions(+), 150 deletions(-) >=20 > diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backligh= t/qcom-wled.c > index 3cd6e75..a746bec 100644 > --- a/drivers/video/backlight/qcom-wled.c > +++ b/drivers/video/backlight/qcom-wled.c > @@ -15,59 +15,71 @@ > #include > #include > #include > +#include > #include > =20 > /* From DT binding */ > +#define WLED_MAX_STRINGS 4 > + > #define WLED_DEFAULT_BRIGHTNESS 2048 > =20 > -#define WLED3_SINK_REG_BRIGHT_MAX 0xFFF > -#define WLED3_CTRL_REG_VAL_BASE 0x40 > +#define WLED_SINK_REG_BRIGHT_MAX 0xFFF Stop this, no. In previous patch you renamed from ABC123_ to WLED3_, now you are renaming back to WLED? Stop messing with the names. I'd actually prefer you to stick with original driver name, and just add note that this now supports more hardware. But yes, _one_ rename is okay. I guess. But renaming it twice in one series is not acceptable. > @@ -365,6 +433,15 @@ static int wled_configure(struct wled *wled, struct = device *dev) > =20 > cfg->num_strings =3D cfg->num_strings + 1; > =20 > + string_len =3D of_property_count_elems_of_size(dev->of_node, > + "qcom,enabled-strings", > + sizeof(u32)); > + if (string_len > 0) > + rc =3D of_property_read_u32_array(dev->of_node, > + "qcom,enabled-strings", > + wled->cfg.enabled_strings, > + sizeof(u32)); > + > return 0; > } rc is assigned but never used. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --GdbWtwDHkcXqP16f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAluDzeMACgkQMOfwapXb+vIXmACePgeIXKK/zRyi4M6+98I9P+Uu MHoAnRNPpj7ocSXmDCnbeVB/eidWJ6CB =Wanx -----END PGP SIGNATURE----- --GdbWtwDHkcXqP16f--