From: Pavel Machek <pavel@ucw.cz>
To: Kiran Gunda <kgunda@codeaurora.org>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
daniel.thompson@linaro.org, b.zolnierkie@samsung.com,
jingoohan1@gmail.com, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, bjorn.andersson@linaro.org,
robh+dt@kernel.org, jacek.anaszewski@gmail.com,
linux-fbdev@vger.kernel.org, linux-arm-msm@vger.kernel.org,
lee.jones@linaro.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH V5 5/8] backlight: qcom-wled: Restructure the driver for WLED3
Date: Mon, 27 Aug 2018 10:09:39 +0000 [thread overview]
Message-ID: <20180827100939.GG31905@amd> (raw)
In-Reply-To: <1535106467-17843-6-git-send-email-kgunda@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]
On Fri 2018-08-24 15:57:44, Kiran Gunda wrote:
> Restructure the driver to add the support for new WLED
> peripherals.
>
> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
> ---
> Changes from V3:
> - This is the new patch after splitting the
> "backlight: qcom-wled: Add support for WLED4 peripheral" patch
> to seperate the WLED3 specific restructure.
>
> Changes from V4:
> - Initialize wled->cfg.enabled_strings to 0,1,2,3.
> - Replaced the WLED3 macro with 3.
>
> drivers/video/backlight/qcom-wled.c | 395 ++++++++++++++++++++++--------------
> 1 file changed, 245 insertions(+), 150 deletions(-)
>
> diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/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 <linux/module.h>
> #include <linux/of.h>
> #include <linux/of_device.h>
> +#include <linux/of_address.h>
> #include <linux/regmap.h>
>
> /* From DT binding */
> +#define WLED_MAX_STRINGS 4
> +
> #define WLED_DEFAULT_BRIGHTNESS 2048
>
> -#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)
>
> cfg->num_strings = cfg->num_strings + 1;
>
> + string_len = of_property_count_elems_of_size(dev->of_node,
> + "qcom,enabled-strings",
> + sizeof(u32));
> + if (string_len > 0)
> + rc = 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
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2018-08-27 10:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1535106467-17843-1-git-send-email-kgunda@codeaurora.org>
2018-08-24 10:39 ` [PATCH V5 1/8] backlight: qcom-wled: Rename pm8941-wled.c to qcom-wled.c Kiran Gunda
2018-08-27 9:49 ` Pavel Machek
2018-08-24 10:39 ` [PATCH V5 4/8] backlight: qcom-wled: Rename PM8941* to WLED3 Kiran Gunda
2018-08-27 10:04 ` Pavel Machek
2018-08-27 15:04 ` Bjorn Andersson
2018-08-24 10:39 ` [PATCH V5 5/8] backlight: qcom-wled: Restructure the driver for WLED3 Kiran Gunda
2018-08-27 10:09 ` Pavel Machek [this message]
2018-08-29 7:22 ` kgunda
2018-08-24 10:39 ` [PATCH V5 6/8] backlight: qcom-wled: Add support for WLED4 peripheral Kiran Gunda
2018-08-24 10:39 ` [PATCH V5 7/8] backlight: qcom-wled: add support for short circuit handling Kiran Gunda
2018-08-24 10:39 ` [PATCH V5 8/8] backlight: qcom-wled: Add auto string detection logic Kiran Gunda
2018-08-27 14:54 ` Bjorn Andersson
2018-08-29 7:25 ` kgunda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180827100939.GG31905@amd \
--to=pavel@ucw.cz \
--cc=b.zolnierkie@samsung.com \
--cc=bjorn.andersson@linaro.org \
--cc=daniel.thompson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacek.anaszewski@gmail.com \
--cc=jingoohan1@gmail.com \
--cc=kgunda@codeaurora.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).