All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle
@ 2021-03-14 10:11 ` Marijn Suijten
  0 siblings, 0 replies; 9+ messages in thread
From: Marijn Suijten @ 2021-03-14 10:11 UTC (permalink / raw)
  To: phone-devel
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Kiran Gunda, Obeida Shamoun,
	Marijn Suijten, Andy Gross, Bjorn Andersson, Lee Jones,
	Daniel Thompson, Jingoo Han, linux-arm-msm, dri-devel,
	linux-fbdev, linux-kernel

From: Obeida Shamoun <oshmoun100@googlemail.com>

WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset.
Therefore, use the sink address as base instead of the ctrl address.

This fixes the sync toggle on wled4, which can be observed by the fact
that adjusting brightness now works.

It has no effect on wled3 because sink and ctrl base addresses are the
same.  This allows adjusting the brightness without having to disable
then reenable the module.

Signed-off-by: Obeida Shamoun <oshmoun100@googlemail.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 drivers/video/backlight/qcom-wled.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
index 091f07e7c145..fc8b443d10fd 100644
--- a/drivers/video/backlight/qcom-wled.c
+++ b/drivers/video/backlight/qcom-wled.c
@@ -336,13 +336,13 @@ static int wled3_sync_toggle(struct wled *wled)
 	unsigned int mask = GENMASK(wled->max_string_count - 1, 0);
 
 	rc = regmap_update_bits(wled->regmap,
-				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
+				wled->sink_addr + WLED3_SINK_REG_SYNC,
 				mask, mask);
 	if (rc < 0)
 		return rc;
 
 	rc = regmap_update_bits(wled->regmap,
-				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
+				wled->sink_addr + WLED3_SINK_REG_SYNC,
 				mask, WLED3_SINK_REG_SYNC_CLEAR);
 
 	return rc;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle
@ 2021-03-14 10:11 ` Marijn Suijten
  0 siblings, 0 replies; 9+ messages in thread
From: Marijn Suijten @ 2021-03-14 10:11 UTC (permalink / raw)
  To: phone-devel
  Cc: Daniel Thompson, Kiran Gunda, Obeida Shamoun, Jingoo Han,
	linux-arm-msm, Konrad Dybcio, linux-fbdev, dri-devel,
	Bjorn Andersson, Andy Gross, Martin Botka,
	~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Marijn Suijten, Lee Jones, linux-kernel

From: Obeida Shamoun <oshmoun100@googlemail.com>

WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset.
Therefore, use the sink address as base instead of the ctrl address.

This fixes the sync toggle on wled4, which can be observed by the fact
that adjusting brightness now works.

It has no effect on wled3 because sink and ctrl base addresses are the
same.  This allows adjusting the brightness without having to disable
then reenable the module.

Signed-off-by: Obeida Shamoun <oshmoun100@googlemail.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 drivers/video/backlight/qcom-wled.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
index 091f07e7c145..fc8b443d10fd 100644
--- a/drivers/video/backlight/qcom-wled.c
+++ b/drivers/video/backlight/qcom-wled.c
@@ -336,13 +336,13 @@ static int wled3_sync_toggle(struct wled *wled)
 	unsigned int mask = GENMASK(wled->max_string_count - 1, 0);
 
 	rc = regmap_update_bits(wled->regmap,
-				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
+				wled->sink_addr + WLED3_SINK_REG_SYNC,
 				mask, mask);
 	if (rc < 0)
 		return rc;
 
 	rc = regmap_update_bits(wled->regmap,
-				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
+				wled->sink_addr + WLED3_SINK_REG_SYNC,
 				mask, WLED3_SINK_REG_SYNC_CLEAR);
 
 	return rc;
-- 
2.30.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle
  2021-03-14 10:11 ` Marijn Suijten
@ 2021-03-15 12:21   ` Daniel Thompson
  -1 siblings, 0 replies; 9+ messages in thread
From: Daniel Thompson @ 2021-03-15 12:21 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: phone-devel, ~postmarketos/upstreaming,
	AngeloGioacchino Del Regno, Konrad Dybcio, Martin Botka,
	Kiran Gunda, Obeida Shamoun, Andy Gross, Bjorn Andersson,
	Lee Jones, Jingoo Han, linux-arm-msm, dri-devel, linux-fbdev,
	linux-kernel

On Sun, Mar 14, 2021 at 11:11:10AM +0100, Marijn Suijten wrote:
> From: Obeida Shamoun <oshmoun100@googlemail.com>
> 
> WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset.
> Therefore, use the sink address as base instead of the ctrl address.
> 
> This fixes the sync toggle on wled4, which can be observed by the fact
> that adjusting brightness now works.
> 
> It has no effect on wled3 because sink and ctrl base addresses are the
> same.  This allows adjusting the brightness without having to disable
> then reenable the module.
> 
> Signed-off-by: Obeida Shamoun <oshmoun100@googlemail.com>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

LGTM, although an acked-by from Kiran would be nice to have:
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.


> ---
>  drivers/video/backlight/qcom-wled.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
> index 091f07e7c145..fc8b443d10fd 100644
> --- a/drivers/video/backlight/qcom-wled.c
> +++ b/drivers/video/backlight/qcom-wled.c
> @@ -336,13 +336,13 @@ static int wled3_sync_toggle(struct wled *wled)
>  	unsigned int mask = GENMASK(wled->max_string_count - 1, 0);
>  
>  	rc = regmap_update_bits(wled->regmap,
> -				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
> +				wled->sink_addr + WLED3_SINK_REG_SYNC,
>  				mask, mask);
>  	if (rc < 0)
>  		return rc;
>  
>  	rc = regmap_update_bits(wled->regmap,
> -				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
> +				wled->sink_addr + WLED3_SINK_REG_SYNC,
>  				mask, WLED3_SINK_REG_SYNC_CLEAR);
>  
>  	return rc;
> -- 
> 2.30.2
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle
@ 2021-03-15 12:21   ` Daniel Thompson
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Thompson @ 2021-03-15 12:21 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: linux-fbdev, Kiran Gunda, Obeida Shamoun, Jingoo Han,
	linux-arm-msm, Konrad Dybcio, linux-kernel, dri-devel,
	Bjorn Andersson, Andy Gross, Martin Botka,
	~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	phone-devel, Lee Jones

On Sun, Mar 14, 2021 at 11:11:10AM +0100, Marijn Suijten wrote:
> From: Obeida Shamoun <oshmoun100@googlemail.com>
> 
> WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset.
> Therefore, use the sink address as base instead of the ctrl address.
> 
> This fixes the sync toggle on wled4, which can be observed by the fact
> that adjusting brightness now works.
> 
> It has no effect on wled3 because sink and ctrl base addresses are the
> same.  This allows adjusting the brightness without having to disable
> then reenable the module.
> 
> Signed-off-by: Obeida Shamoun <oshmoun100@googlemail.com>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

LGTM, although an acked-by from Kiran would be nice to have:
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.


> ---
>  drivers/video/backlight/qcom-wled.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
> index 091f07e7c145..fc8b443d10fd 100644
> --- a/drivers/video/backlight/qcom-wled.c
> +++ b/drivers/video/backlight/qcom-wled.c
> @@ -336,13 +336,13 @@ static int wled3_sync_toggle(struct wled *wled)
>  	unsigned int mask = GENMASK(wled->max_string_count - 1, 0);
>  
>  	rc = regmap_update_bits(wled->regmap,
> -				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
> +				wled->sink_addr + WLED3_SINK_REG_SYNC,
>  				mask, mask);
>  	if (rc < 0)
>  		return rc;
>  
>  	rc = regmap_update_bits(wled->regmap,
> -				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
> +				wled->sink_addr + WLED3_SINK_REG_SYNC,
>  				mask, WLED3_SINK_REG_SYNC_CLEAR);
>  
>  	return rc;
> -- 
> 2.30.2
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle
  2021-03-15 12:21   ` Daniel Thompson
@ 2021-03-17  4:00     ` kgunda
  -1 siblings, 0 replies; 9+ messages in thread
From: kgunda @ 2021-03-17  4:00 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Marijn Suijten, phone-devel, ~postmarketos/upstreaming,
	AngeloGioacchino Del Regno, Konrad Dybcio, Martin Botka,
	Obeida Shamoun, Andy Gross, Bjorn Andersson, Lee Jones,
	Jingoo Han, linux-arm-msm, dri-devel, linux-fbdev, linux-kernel

On 2021-03-15 17:51, Daniel Thompson wrote:
> On Sun, Mar 14, 2021 at 11:11:10AM +0100, Marijn Suijten wrote:
>> From: Obeida Shamoun <oshmoun100@googlemail.com>
>> 
>> WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset.
>> Therefore, use the sink address as base instead of the ctrl address.
>> 
>> This fixes the sync toggle on wled4, which can be observed by the fact
>> that adjusting brightness now works.
>> 
>> It has no effect on wled3 because sink and ctrl base addresses are the
>> same.  This allows adjusting the brightness without having to disable
>> then reenable the module.
>> 
>> Signed-off-by: Obeida Shamoun <oshmoun100@googlemail.com>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> 
> LGTM, although an acked-by from Kiran would be nice to have:
> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
> 
> 
> Daniel.
> 
> 
Acked-by: Kiran Gunda <kgunda@codeaurora.org>

>> ---
>>  drivers/video/backlight/qcom-wled.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/video/backlight/qcom-wled.c 
>> b/drivers/video/backlight/qcom-wled.c
>> index 091f07e7c145..fc8b443d10fd 100644
>> --- a/drivers/video/backlight/qcom-wled.c
>> +++ b/drivers/video/backlight/qcom-wled.c
>> @@ -336,13 +336,13 @@ static int wled3_sync_toggle(struct wled *wled)
>>  	unsigned int mask = GENMASK(wled->max_string_count - 1, 0);
>> 
>>  	rc = regmap_update_bits(wled->regmap,
>> -				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
>> +				wled->sink_addr + WLED3_SINK_REG_SYNC,
>>  				mask, mask);
>>  	if (rc < 0)
>>  		return rc;
>> 
>>  	rc = regmap_update_bits(wled->regmap,
>> -				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
>> +				wled->sink_addr + WLED3_SINK_REG_SYNC,
>>  				mask, WLED3_SINK_REG_SYNC_CLEAR);
>> 
>>  	return rc;
>> --
>> 2.30.2
>> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle
@ 2021-03-17  4:00     ` kgunda
  0 siblings, 0 replies; 9+ messages in thread
From: kgunda @ 2021-03-17  4:00 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: linux-fbdev, Obeida Shamoun, Jingoo Han, linux-arm-msm,
	Konrad Dybcio, linux-kernel, dri-devel, Bjorn Andersson,
	Andy Gross, Martin Botka, ~postmarketos/upstreaming,
	AngeloGioacchino Del Regno, Marijn Suijten, phone-devel,
	Lee Jones

On 2021-03-15 17:51, Daniel Thompson wrote:
> On Sun, Mar 14, 2021 at 11:11:10AM +0100, Marijn Suijten wrote:
>> From: Obeida Shamoun <oshmoun100@googlemail.com>
>> 
>> WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset.
>> Therefore, use the sink address as base instead of the ctrl address.
>> 
>> This fixes the sync toggle on wled4, which can be observed by the fact
>> that adjusting brightness now works.
>> 
>> It has no effect on wled3 because sink and ctrl base addresses are the
>> same.  This allows adjusting the brightness without having to disable
>> then reenable the module.
>> 
>> Signed-off-by: Obeida Shamoun <oshmoun100@googlemail.com>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
>> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> 
> LGTM, although an acked-by from Kiran would be nice to have:
> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
> 
> 
> Daniel.
> 
> 
Acked-by: Kiran Gunda <kgunda@codeaurora.org>

>> ---
>>  drivers/video/backlight/qcom-wled.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/video/backlight/qcom-wled.c 
>> b/drivers/video/backlight/qcom-wled.c
>> index 091f07e7c145..fc8b443d10fd 100644
>> --- a/drivers/video/backlight/qcom-wled.c
>> +++ b/drivers/video/backlight/qcom-wled.c
>> @@ -336,13 +336,13 @@ static int wled3_sync_toggle(struct wled *wled)
>>  	unsigned int mask = GENMASK(wled->max_string_count - 1, 0);
>> 
>>  	rc = regmap_update_bits(wled->regmap,
>> -				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
>> +				wled->sink_addr + WLED3_SINK_REG_SYNC,
>>  				mask, mask);
>>  	if (rc < 0)
>>  		return rc;
>> 
>>  	rc = regmap_update_bits(wled->regmap,
>> -				wled->ctrl_addr + WLED3_SINK_REG_SYNC,
>> +				wled->sink_addr + WLED3_SINK_REG_SYNC,
>>  				mask, WLED3_SINK_REG_SYNC_CLEAR);
>> 
>>  	return rc;
>> --
>> 2.30.2
>> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle
  2021-03-14 10:11 ` Marijn Suijten
@ 2021-03-17  9:16   ` Lee Jones
  -1 siblings, 0 replies; 9+ messages in thread
From: Lee Jones @ 2021-03-17  9:16 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: phone-devel, ~postmarketos/upstreaming,
	AngeloGioacchino Del Regno, Konrad Dybcio, Martin Botka,
	Kiran Gunda, Obeida Shamoun, Andy Gross, Bjorn Andersson,
	Daniel Thompson, Jingoo Han, linux-arm-msm, dri-devel,
	linux-fbdev, linux-kernel

On Sun, 14 Mar 2021, Marijn Suijten wrote:

> From: Obeida Shamoun <oshmoun100@googlemail.com>
> 
> WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset.
> Therefore, use the sink address as base instead of the ctrl address.
> 
> This fixes the sync toggle on wled4, which can be observed by the fact
> that adjusting brightness now works.
> 
> It has no effect on wled3 because sink and ctrl base addresses are the
> same.  This allows adjusting the brightness without having to disable
> then reenable the module.
> 
> Signed-off-by: Obeida Shamoun <oshmoun100@googlemail.com>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
>  drivers/video/backlight/qcom-wled.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle
@ 2021-03-17  9:16   ` Lee Jones
  0 siblings, 0 replies; 9+ messages in thread
From: Lee Jones @ 2021-03-17  9:16 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: Daniel Thompson, Kiran Gunda, Obeida Shamoun, Jingoo Han,
	linux-arm-msm, Konrad Dybcio, linux-fbdev, dri-devel,
	Bjorn Andersson, Andy Gross, Martin Botka,
	~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	phone-devel, linux-kernel

On Sun, 14 Mar 2021, Marijn Suijten wrote:

> From: Obeida Shamoun <oshmoun100@googlemail.com>
> 
> WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset.
> Therefore, use the sink address as base instead of the ctrl address.
> 
> This fixes the sync toggle on wled4, which can be observed by the fact
> that adjusting brightness now works.
> 
> It has no effect on wled3 because sink and ctrl base addresses are the
> same.  This allows adjusting the brightness without having to disable
> then reenable the module.
> 
> Signed-off-by: Obeida Shamoun <oshmoun100@googlemail.com>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
>  drivers/video/backlight/qcom-wled.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle
  2021-03-14 10:11 ` Marijn Suijten
                   ` (2 preceding siblings ...)
  (?)
@ 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
  -1 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-05-26 19:03 UTC (permalink / raw)
  To: Marijn Suijten; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Sun, 14 Mar 2021 11:11:10 +0100 you wrote:
> From: Obeida Shamoun <oshmoun100@googlemail.com>
> 
> WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset.
> Therefore, use the sink address as base instead of the ctrl address.
> 
> This fixes the sync toggle on wled4, which can be observed by the fact
> that adjusting brightness now works.
> 
> [...]

Here is the summary with links:
  - backlight: qcom-wled: Use sink_addr for sync toggle
    https://git.kernel.org/qcom/c/cdfd4c689e2a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-26 19:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14 10:11 [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle Marijn Suijten
2021-03-14 10:11 ` Marijn Suijten
2021-03-15 12:21 ` Daniel Thompson
2021-03-15 12:21   ` Daniel Thompson
2021-03-17  4:00   ` kgunda
2021-03-17  4:00     ` kgunda
2021-03-17  9:16 ` Lee Jones
2021-03-17  9:16   ` Lee Jones
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm

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.