* [PATCH v1] led: flash: various minor fixes for leds-qcom-flash driver
@ 2023-07-18 9:24 Fenglin Wu
2023-07-18 9:32 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Fenglin Wu @ 2023-07-18 9:24 UTC (permalink / raw)
To: linux-arm-msm, linux-kernel, lee, pavel, krzysztof.kozlowski,
Fenglin Wu, ChiaEn Wu, Alice Chen, ChiYuan Huang,
Dylan Van Assche, Jiapeng Chong, Tom Rix, linux-leds
Cc: quic_collinsd, quic_subbaram
Update the driver to address following minor issues:
- Add a sentence in Kconfig to explain the driver can be compiled
as a module
- strobe off the LED channel before setting flash current to prevent
the flash LED being lit with an incorrect brightness if it was
already active in torch mode
- put the child node if register any flash LED device failed.
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
---
drivers/leds/flash/Kconfig | 2 ++
drivers/leds/flash/leds-qcom-flash.c | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/drivers/leds/flash/Kconfig b/drivers/leds/flash/Kconfig
index 4ed2efc65434..4e08dbc05709 100644
--- a/drivers/leds/flash/Kconfig
+++ b/drivers/leds/flash/Kconfig
@@ -89,6 +89,8 @@ config LEDS_QCOM_FLASH
the total LED current will be split symmetrically on each channel and
they will be enabled/disabled at the same time.
+ This driver can be built as a module, it will be called "leds-qcom-flash".
+
config LEDS_RT4505
tristate "LED support for RT4505 flashlight controller"
depends on I2C && OF
diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c
index b089ca1a1901..a73d3ea5c97a 100644
--- a/drivers/leds/flash/leds-qcom-flash.c
+++ b/drivers/leds/flash/leds-qcom-flash.c
@@ -309,6 +309,10 @@ static int qcom_flash_strobe_set(struct led_classdev_flash *fled_cdev, bool stat
struct qcom_flash_led *led = flcdev_to_qcom_fled(fled_cdev);
int rc;
+ rc = set_flash_strobe(led, SW_STROBE, false);
+ if (rc)
+ return rc;
+
rc = set_flash_current(led, led->flash_current_ma, FLASH_MODE);
if (rc)
return rc;
@@ -745,6 +749,7 @@ static int qcom_flash_led_probe(struct platform_device *pdev)
return 0;
release:
+ fwnode_handle_put(child);
while (flash_data->v4l2_flash[flash_data->leds_count] && flash_data->leds_count)
v4l2_flash_release(flash_data->v4l2_flash[flash_data->leds_count--]);
return rc;
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] led: flash: various minor fixes for leds-qcom-flash driver
2023-07-18 9:24 [PATCH v1] led: flash: various minor fixes for leds-qcom-flash driver Fenglin Wu
@ 2023-07-18 9:32 ` Krzysztof Kozlowski
2023-07-18 9:52 ` Fenglin Wu
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-18 9:32 UTC (permalink / raw)
To: Fenglin Wu, linux-arm-msm, linux-kernel, lee, pavel, ChiaEn Wu,
Alice Chen, ChiYuan Huang, Dylan Van Assche, Jiapeng Chong,
Tom Rix, linux-leds
Cc: quic_collinsd, quic_subbaram
On 18/07/2023 11:24, Fenglin Wu wrote:
> Update the driver to address following minor issues:
> - Add a sentence in Kconfig to explain the driver can be compiled
> as a module
> - strobe off the LED channel before setting flash current to prevent
> the flash LED being lit with an incorrect brightness if it was
> already active in torch mode
> - put the child node if register any flash LED device failed.
Don't mix different fixes and changes in one commit.
Also, please use scripts/get_maintainers.pl to get a list of necessary
people and lists to CC (and consider --no-git-fallback argument). I
really do not see a point why I am cc-ed here.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] led: flash: various minor fixes for leds-qcom-flash driver
2023-07-18 9:32 ` Krzysztof Kozlowski
@ 2023-07-18 9:52 ` Fenglin Wu
2023-07-19 8:50 ` Lee Jones
0 siblings, 1 reply; 5+ messages in thread
From: Fenglin Wu @ 2023-07-18 9:52 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-arm-msm, linux-kernel, lee, pavel,
ChiaEn Wu, Alice Chen, ChiYuan Huang, Dylan Van Assche,
Jiapeng Chong, Tom Rix, linux-leds
Cc: quic_collinsd, quic_subbaram
On 7/18/2023 5:32 PM, Krzysztof Kozlowski wrote:
> On 18/07/2023 11:24, Fenglin Wu wrote:
>> Update the driver to address following minor issues:
>> - Add a sentence in Kconfig to explain the driver can be compiled
>> as a module
>> - strobe off the LED channel before setting flash current to prevent
>> the flash LED being lit with an incorrect brightness if it was
>> already active in torch mode
>> - put the child node if register any flash LED device failed.
>
> Don't mix different fixes and changes in one commit.
>
> Also, please use scripts/get_maintainers.pl to get a list of necessary
> people and lists to CC (and consider --no-git-fallback argument). I
> really do not see a point why I am cc-ed here.
>
> Best regards,
> Krzysztof
I understood that we should separate the changes for different fixes.
I am trying to address the review comment from Pavel that was coming
late after the original changes were applied:
https://lore.kernel.org/linux-arm-msm/20230325170957.GA2904@bug/ (sorry
for just got time to work on this), since all of them are small ones and
all related with the same driver, so I thought it might be good to put
them together and update with a single patch?
BTW, you are copied because you also reviewed the original changes.
Thanks
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] led: flash: various minor fixes for leds-qcom-flash driver
2023-07-18 9:52 ` Fenglin Wu
@ 2023-07-19 8:50 ` Lee Jones
2023-07-19 8:52 ` Fenglin Wu
0 siblings, 1 reply; 5+ messages in thread
From: Lee Jones @ 2023-07-19 8:50 UTC (permalink / raw)
To: Fenglin Wu
Cc: Krzysztof Kozlowski, linux-arm-msm, linux-kernel, pavel,
ChiaEn Wu, Alice Chen, ChiYuan Huang, Dylan Van Assche,
Jiapeng Chong, Tom Rix, linux-leds, quic_collinsd, quic_subbaram
On Tue, 18 Jul 2023, Fenglin Wu wrote:
>
>
> On 7/18/2023 5:32 PM, Krzysztof Kozlowski wrote:
> > On 18/07/2023 11:24, Fenglin Wu wrote:
> > > Update the driver to address following minor issues:
> > > - Add a sentence in Kconfig to explain the driver can be compiled
> > > as a module
> > > - strobe off the LED channel before setting flash current to prevent
> > > the flash LED being lit with an incorrect brightness if it was
> > > already active in torch mode
> > > - put the child node if register any flash LED device failed.
> >
> > Don't mix different fixes and changes in one commit.
> >
> > Also, please use scripts/get_maintainers.pl to get a list of necessary
> > people and lists to CC (and consider --no-git-fallback argument). I
> > really do not see a point why I am cc-ed here.
> >
> > Best regards,
> > Krzysztof
>
> I understood that we should separate the changes for different fixes.
>
> I am trying to address the review comment from Pavel that was coming late
> after the original changes were applied:
> https://lore.kernel.org/linux-arm-msm/20230325170957.GA2904@bug/ (sorry for
> just got time to work on this), since all of them are small ones and all
> related with the same driver, so I thought it might be good to put them
> together and update with a single patch?
Separate patches - one per functional change please.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] led: flash: various minor fixes for leds-qcom-flash driver
2023-07-19 8:50 ` Lee Jones
@ 2023-07-19 8:52 ` Fenglin Wu
0 siblings, 0 replies; 5+ messages in thread
From: Fenglin Wu @ 2023-07-19 8:52 UTC (permalink / raw)
To: Lee Jones
Cc: Krzysztof Kozlowski, linux-arm-msm, linux-kernel, pavel,
ChiaEn Wu, Alice Chen, ChiYuan Huang, Dylan Van Assche,
Jiapeng Chong, Tom Rix, linux-leds, quic_collinsd, quic_subbaram
On 7/19/2023 4:50 PM, Lee Jones wrote:
> On Tue, 18 Jul 2023, Fenglin Wu wrote:
>
>>
>>
>> On 7/18/2023 5:32 PM, Krzysztof Kozlowski wrote:
>>> On 18/07/2023 11:24, Fenglin Wu wrote:
>>>> Update the driver to address following minor issues:
>>>> - Add a sentence in Kconfig to explain the driver can be compiled
>>>> as a module
>>>> - strobe off the LED channel before setting flash current to prevent
>>>> the flash LED being lit with an incorrect brightness if it was
>>>> already active in torch mode
>>>> - put the child node if register any flash LED device failed.
>>>
>>> Don't mix different fixes and changes in one commit.
>>>
>>> Also, please use scripts/get_maintainers.pl to get a list of necessary
>>> people and lists to CC (and consider --no-git-fallback argument). I
>>> really do not see a point why I am cc-ed here.
>>>
>>> Best regards,
>>> Krzysztof
>>
>> I understood that we should separate the changes for different fixes.
>>
>> I am trying to address the review comment from Pavel that was coming late
>> after the original changes were applied:
>> https://lore.kernel.org/linux-arm-msm/20230325170957.GA2904@bug/ (sorry for
>> just got time to work on this), since all of them are small ones and all
>> related with the same driver, so I thought it might be good to put them
>> together and update with a single patch?
>
> Separate patches - one per functional change please.
sure. I will separate them and send them out.
Thanks
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-19 8:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18 9:24 [PATCH v1] led: flash: various minor fixes for leds-qcom-flash driver Fenglin Wu
2023-07-18 9:32 ` Krzysztof Kozlowski
2023-07-18 9:52 ` Fenglin Wu
2023-07-19 8:50 ` Lee Jones
2023-07-19 8:52 ` Fenglin Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox