From: kgunda@codeaurora.org
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: jingoohan1@gmail.com, lee.jones@linaro.org,
b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org,
Daniel Thompson <daniel.thompson@linaro.org>,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH V3 4/7] backlight: qcom-wled: Rename PM8941* to WLED3
Date: Wed, 20 Jun 2018 11:56:37 +0530 [thread overview]
Message-ID: <ef852ddeb4557e036ee76e13355cfeb4@codeaurora.org> (raw)
In-Reply-To: <20180619231126.GH15126@tuxbook-pro>
On 2018-06-20 04:41, Bjorn Andersson wrote:
> On Tue 19 Jun 04:13 PDT 2018, Kiran Gunda wrote:
>
>> Rename the PM8941* references as WLED3 to make the
>> driver generic and have WLED support for other PMICs.
>>
>
> Looks good, just three minor comments below.
>
>> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
>> ---
>> drivers/video/backlight/qcom-wled.c | 248
>> ++++++++++++++++++------------------
>> 1 file changed, 125 insertions(+), 123 deletions(-)
>>
>> diff --git a/drivers/video/backlight/qcom-wled.c
>> b/drivers/video/backlight/qcom-wled.c
>> index 0b6d219..812f3cb 100644
>> --- a/drivers/video/backlight/qcom-wled.c
>> +++ b/drivers/video/backlight/qcom-wled.c
>> @@ -18,77 +18,79 @@
>> #include <linux/regmap.h>
>>
>> /* From DT binding */
>> -#define PM8941_WLED_DEFAULT_BRIGHTNESS 2048
>> +#define WLED_DEFAULT_BRIGHTNESS 2048
>>
>> -#define PM8941_WLED_REG_VAL_BASE 0x40
>> -#define PM8941_WLED_REG_VAL_MAX 0xFFF
>> +#define WLED3_SINK_REG_BRIGHT_MAX 0xFFF
>> +#define WLED3_CTRL_REG_VAL_BASE 0x40
>>
>> -#define PM8941_WLED_REG_MOD_EN 0x46
>> -#define PM8941_WLED_REG_MOD_EN_BIT BIT(7)
>> -#define PM8941_WLED_REG_MOD_EN_MASK BIT(7)
>> +/* WLED3 control registers */
>> +#define WLED3_CTRL_REG_MOD_EN 0x46
>> +#define WLED3_CTRL_REG_MOD_EN_BIT BIT(7)
>> +#define WLED3_CTRL_REG_MOD_EN_MASK BIT(7)
>>
>> -#define PM8941_WLED_REG_SYNC 0x47
>
> These are in address order, any reason why WLED3_SINK_REG_SYNC moved
> down?
>
Actually, this is a sink specific register. That's why moved it to
under the /* WLED3 sink specific registers */
>> -#define PM8941_WLED_REG_SYNC_MASK 0x07
>> -#define PM8941_WLED_REG_SYNC_LED1 BIT(0)
>> -#define PM8941_WLED_REG_SYNC_LED2 BIT(1)
>> -#define PM8941_WLED_REG_SYNC_LED3 BIT(2)
>> -#define PM8941_WLED_REG_SYNC_ALL 0x07
>> -#define PM8941_WLED_REG_SYNC_CLEAR 0x00
>> +#define WLED3_CTRL_REG_FREQ 0x4c
>> +#define WLED3_CTRL_REG_FREQ_MASK 0x0f
>>
>> -#define PM8941_WLED_REG_FREQ 0x4c
>> -#define PM8941_WLED_REG_FREQ_MASK 0x0f
>> +#define WLED3_CTRL_REG_OVP 0x4d
>> +#define WLED3_CTRL_REG_OVP_MASK 0x03
>>
>> -#define PM8941_WLED_REG_OVP 0x4d
>> -#define PM8941_WLED_REG_OVP_MASK 0x03
>> +#define WLED3_CTRL_REG_ILIMIT 0x4e
>> +#define WLED3_CTRL_REG_ILIMIT_MASK 0x07
>>
>> -#define PM8941_WLED_REG_BOOST 0x4e
>> -#define PM8941_WLED_REG_BOOST_MASK 0x07
>> +/* WLED3 sink registers */
>> +#define WLED3_SINK_REG_SYNC 0x47
>> +#define WLED3_SINK_REG_SYNC_MASK 0x07
>> +#define WLED3_SINK_REG_SYNC_LED1 BIT(0)
>> +#define WLED3_SINK_REG_SYNC_LED2 BIT(1)
>> +#define WLED3_SINK_REG_SYNC_LED3 BIT(2)
>> +#define WLED3_SINK_REG_SYNC_ALL 0x07
>> +#define WLED3_SINK_REG_SYNC_CLEAR 0x00
>>
> [..]
>> -struct pm8941_wled_config {
>> - u32 i_boost_limit;
>> +struct wled_config {
>> + u32 boost_i_limit;
>> u32 ovp;
>> u32 switch_freq;
>> u32 num_strings;
>> - u32 i_limit;
>> + u32 string_i_limit;
>
> Changing the members in this struct seems unrelated.
>
Changed the members, to have resemblance with the IPCAT and
better readability .
>> bool cs_out_en;
>> bool ext_gen;
>> bool cabc_en;
>> };
>>
> [..]
>> -MODULE_DESCRIPTION("pm8941 wled driver");
>> +MODULE_DESCRIPTION("qcom wled driver");
>
> I would prefer if this was "Qualcomm WLED driver".
>
Sure. I will change it in the next series.
>> MODULE_LICENSE("GPL v2");
>
> Regards,
> Bjorn
WARNING: multiple messages have this Message-ID (diff)
From: kgunda@codeaurora.org
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: jingoohan1@gmail.com, lee.jones@linaro.org,
b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org,
Daniel Thompson <daniel.thompson@linaro.org>,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH V3 4/7] backlight: qcom-wled: Rename PM8941* to WLED3
Date: Wed, 20 Jun 2018 06:38:37 +0000 [thread overview]
Message-ID: <ef852ddeb4557e036ee76e13355cfeb4@codeaurora.org> (raw)
In-Reply-To: <20180619231126.GH15126@tuxbook-pro>
On 2018-06-20 04:41, Bjorn Andersson wrote:
> On Tue 19 Jun 04:13 PDT 2018, Kiran Gunda wrote:
>
>> Rename the PM8941* references as WLED3 to make the
>> driver generic and have WLED support for other PMICs.
>>
>
> Looks good, just three minor comments below.
>
>> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
>> ---
>> drivers/video/backlight/qcom-wled.c | 248
>> ++++++++++++++++++------------------
>> 1 file changed, 125 insertions(+), 123 deletions(-)
>>
>> diff --git a/drivers/video/backlight/qcom-wled.c
>> b/drivers/video/backlight/qcom-wled.c
>> index 0b6d219..812f3cb 100644
>> --- a/drivers/video/backlight/qcom-wled.c
>> +++ b/drivers/video/backlight/qcom-wled.c
>> @@ -18,77 +18,79 @@
>> #include <linux/regmap.h>
>>
>> /* From DT binding */
>> -#define PM8941_WLED_DEFAULT_BRIGHTNESS 2048
>> +#define WLED_DEFAULT_BRIGHTNESS 2048
>>
>> -#define PM8941_WLED_REG_VAL_BASE 0x40
>> -#define PM8941_WLED_REG_VAL_MAX 0xFFF
>> +#define WLED3_SINK_REG_BRIGHT_MAX 0xFFF
>> +#define WLED3_CTRL_REG_VAL_BASE 0x40
>>
>> -#define PM8941_WLED_REG_MOD_EN 0x46
>> -#define PM8941_WLED_REG_MOD_EN_BIT BIT(7)
>> -#define PM8941_WLED_REG_MOD_EN_MASK BIT(7)
>> +/* WLED3 control registers */
>> +#define WLED3_CTRL_REG_MOD_EN 0x46
>> +#define WLED3_CTRL_REG_MOD_EN_BIT BIT(7)
>> +#define WLED3_CTRL_REG_MOD_EN_MASK BIT(7)
>>
>> -#define PM8941_WLED_REG_SYNC 0x47
>
> These are in address order, any reason why WLED3_SINK_REG_SYNC moved
> down?
>
Actually, this is a sink specific register. That's why moved it to
under the /* WLED3 sink specific registers */
>> -#define PM8941_WLED_REG_SYNC_MASK 0x07
>> -#define PM8941_WLED_REG_SYNC_LED1 BIT(0)
>> -#define PM8941_WLED_REG_SYNC_LED2 BIT(1)
>> -#define PM8941_WLED_REG_SYNC_LED3 BIT(2)
>> -#define PM8941_WLED_REG_SYNC_ALL 0x07
>> -#define PM8941_WLED_REG_SYNC_CLEAR 0x00
>> +#define WLED3_CTRL_REG_FREQ 0x4c
>> +#define WLED3_CTRL_REG_FREQ_MASK 0x0f
>>
>> -#define PM8941_WLED_REG_FREQ 0x4c
>> -#define PM8941_WLED_REG_FREQ_MASK 0x0f
>> +#define WLED3_CTRL_REG_OVP 0x4d
>> +#define WLED3_CTRL_REG_OVP_MASK 0x03
>>
>> -#define PM8941_WLED_REG_OVP 0x4d
>> -#define PM8941_WLED_REG_OVP_MASK 0x03
>> +#define WLED3_CTRL_REG_ILIMIT 0x4e
>> +#define WLED3_CTRL_REG_ILIMIT_MASK 0x07
>>
>> -#define PM8941_WLED_REG_BOOST 0x4e
>> -#define PM8941_WLED_REG_BOOST_MASK 0x07
>> +/* WLED3 sink registers */
>> +#define WLED3_SINK_REG_SYNC 0x47
>> +#define WLED3_SINK_REG_SYNC_MASK 0x07
>> +#define WLED3_SINK_REG_SYNC_LED1 BIT(0)
>> +#define WLED3_SINK_REG_SYNC_LED2 BIT(1)
>> +#define WLED3_SINK_REG_SYNC_LED3 BIT(2)
>> +#define WLED3_SINK_REG_SYNC_ALL 0x07
>> +#define WLED3_SINK_REG_SYNC_CLEAR 0x00
>>
> [..]
>> -struct pm8941_wled_config {
>> - u32 i_boost_limit;
>> +struct wled_config {
>> + u32 boost_i_limit;
>> u32 ovp;
>> u32 switch_freq;
>> u32 num_strings;
>> - u32 i_limit;
>> + u32 string_i_limit;
>
> Changing the members in this struct seems unrelated.
>
Changed the members, to have resemblance with the IPCAT and
better readability .
>> bool cs_out_en;
>> bool ext_gen;
>> bool cabc_en;
>> };
>>
> [..]
>> -MODULE_DESCRIPTION("pm8941 wled driver");
>> +MODULE_DESCRIPTION("qcom wled driver");
>
> I would prefer if this was "Qualcomm WLED driver".
>
Sure. I will change it in the next series.
>> MODULE_LICENSE("GPL v2");
>
> Regards,
> Bjorn
next prev parent reply other threads:[~2018-06-20 6:26 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 11:13 [PATCH V3 0/7] backlight: qcom-wled: Support for QCOM wled driver Kiran Gunda
2018-06-19 11:13 ` [PATCH V3 1/7] backlight: qcom-wled: Rename pm8941-wled.c to qcom-wled.c Kiran Gunda
2018-06-19 11:25 ` Kiran Gunda
2018-06-19 22:54 ` Bjorn Andersson
2018-06-19 22:54 ` Bjorn Andersson
2018-06-20 5:23 ` kgunda
2018-06-20 5:35 ` kgunda
2018-06-20 18:27 ` Rob Herring
2018-06-20 18:27 ` Rob Herring
2018-06-20 18:27 ` Rob Herring
2018-06-21 13:05 ` Daniel Thompson
2018-06-21 13:05 ` Daniel Thompson
2018-06-21 13:05 ` Daniel Thompson
2018-06-21 13:12 ` Daniel Thompson
2018-06-21 13:12 ` Daniel Thompson
2018-06-21 13:12 ` Daniel Thompson
2018-06-19 11:13 ` [PATCH V3 2/7] backlight: qcom-wled: restructure the qcom-wled bindings Kiran Gunda
2018-06-19 22:56 ` Bjorn Andersson
2018-06-20 18:29 ` Rob Herring
2018-06-20 18:29 ` Rob Herring
2018-06-21 13:12 ` Daniel Thompson
2018-06-21 13:12 ` Daniel Thompson
2018-06-19 11:13 ` [PATCH V3 3/7] backlight: qcom-wled: Add new properties for PMI8998 Kiran Gunda
2018-06-19 23:03 ` Bjorn Andersson
2018-06-20 5:25 ` kgunda
2018-06-20 19:05 ` Rob Herring
2018-06-20 19:05 ` Rob Herring
2018-06-21 5:14 ` kgunda
2018-06-19 11:13 ` [PATCH V3 4/7] backlight: qcom-wled: Rename PM8941* to WLED3 Kiran Gunda
2018-06-19 11:25 ` Kiran Gunda
2018-06-19 23:11 ` Bjorn Andersson
2018-06-19 23:11 ` Bjorn Andersson
2018-06-20 6:26 ` kgunda [this message]
2018-06-20 6:38 ` kgunda
2018-06-19 11:13 ` [PATCH V3 5/7] backlight: qcom-wled: Add support for WLED4 peripheral Kiran Gunda
2018-06-19 11:25 ` Kiran Gunda
2018-06-20 5:14 ` Bjorn Andersson
2018-06-20 5:14 ` Bjorn Andersson
2018-06-20 11:00 ` kgunda
2018-06-20 11:12 ` kgunda
2018-06-22 23:09 ` Bjorn Andersson
2018-06-22 23:09 ` Bjorn Andersson
2018-06-25 5:54 ` kgunda
2018-06-25 6:06 ` kgunda
2018-06-19 11:13 ` [PATCH V3 6/7] backlight: qcom-wled: add support for short circuit handling Kiran Gunda
2018-06-19 11:25 ` Kiran Gunda
2018-06-20 5:33 ` Bjorn Andersson
2018-06-20 5:33 ` Bjorn Andersson
2018-06-20 5:47 ` Vinod
2018-06-20 5:59 ` Vinod
2018-06-20 5:47 ` Vinod
2018-06-20 11:03 ` kgunda
2018-06-20 11:15 ` kgunda
2018-06-19 11:13 ` [PATCH V3 7/7] backlight: qcom-wled: Add auto string detection logic Kiran Gunda
2018-06-19 11:25 ` Kiran Gunda
2018-06-20 6:22 ` Bjorn Andersson
2018-06-20 6:22 ` Bjorn Andersson
2018-06-20 12:37 ` kgunda
2018-06-20 12:49 ` 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=ef852ddeb4557e036ee76e13355cfeb4@codeaurora.org \
--to=kgunda@codeaurora.org \
--cc=b.zolnierkie@samsung.com \
--cc=bjorn.andersson@linaro.org \
--cc=daniel.thompson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.