* [PATCH v2 0/3] leds-qcom-flash: several tiny fixes
@ 2023-07-25 9:57 Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 1/3] leds: flash: leds-qcom-flash: declare the driver as a module Fenglin Wu
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Fenglin Wu @ 2023-07-25 9:57 UTC (permalink / raw)
To: Fenglin Wu, linux-arm-msm, Pavel Machek, Lee Jones
Cc: linux-leds, linux-kernel
Add small changes to address the review comments from Paval which were
posted after the driver was applied:
https://lore.kernel.org/linux-arm-msm/20230325170957.GA2904@bug/#t
https://lore.kernel.org/linux-arm-msm/ZB8wbv93+Vmx3trt@duo.ucw.cz/
1) Add a sentence in Kconfig to explain the driver can be compiled as a
module
2) Strobe off the LED channel before setting flash current
3) Put the child node while register flash LED device failed.
Changes in v2:
Sperate the fixes into 3 independent changes.
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
---
Fenglin Wu (3):
leds: flash: leds-qcom-flash: declare the driver as a module
leds: flash: leds-qcom-flash: turn off LED before setting flash current
leds: flash: leds-qcom-flash: put child node if registration failed
drivers/leds/flash/Kconfig | 2 ++
drivers/leds/flash/leds-qcom-flash.c | 5 +++++
2 files changed, 7 insertions(+)
---
base-commit: 7a2b85a76b05f16e8e788d035afcacdd4faa1d71
change-id: 20230725-leds-qcom-flash-driver-tiny-fixes-f6fd8d90eb94
Best regards,
--
Fenglin Wu <quic_fenglinw@quicinc.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] leds: flash: leds-qcom-flash: declare the driver as a module
2023-07-25 9:57 [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Fenglin Wu
@ 2023-07-25 9:57 ` Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 2/3] leds: flash: leds-qcom-flash: turn off LED before setting flash current Fenglin Wu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Fenglin Wu @ 2023-07-25 9:57 UTC (permalink / raw)
To: Fenglin Wu, linux-arm-msm, Pavel Machek, Lee Jones
Cc: linux-leds, linux-kernel
Explain in Kconfig that the driver can be compiled as a module.
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
---
drivers/leds/flash/Kconfig | 2 ++
1 file changed, 2 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
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] leds: flash: leds-qcom-flash: turn off LED before setting flash current
2023-07-25 9:57 [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 1/3] leds: flash: leds-qcom-flash: declare the driver as a module Fenglin Wu
@ 2023-07-25 9:57 ` Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 3/3] leds: flash: leds-qcom-flash: put child node if registration failed Fenglin Wu
2023-07-28 11:17 ` [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Lee Jones
3 siblings, 0 replies; 5+ messages in thread
From: Fenglin Wu @ 2023-07-25 9:57 UTC (permalink / raw)
To: Fenglin Wu, linux-arm-msm, Pavel Machek, Lee Jones
Cc: linux-leds, linux-kernel
Strobe off the LED before setting flash current to avoid it's being
enabled with an incorrect current if it has been working in torch
mode.
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
---
drivers/leds/flash/leds-qcom-flash.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c
index b089ca1a1901..29cf09479422 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;
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] leds: flash: leds-qcom-flash: put child node if registration failed
2023-07-25 9:57 [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 1/3] leds: flash: leds-qcom-flash: declare the driver as a module Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 2/3] leds: flash: leds-qcom-flash: turn off LED before setting flash current Fenglin Wu
@ 2023-07-25 9:57 ` Fenglin Wu
2023-07-28 11:17 ` [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Lee Jones
3 siblings, 0 replies; 5+ messages in thread
From: Fenglin Wu @ 2023-07-25 9:57 UTC (permalink / raw)
To: Fenglin Wu, linux-arm-msm, Pavel Machek, Lee Jones
Cc: linux-leds, linux-kernel
Put the child node if register flash LED device failed.
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
---
drivers/leds/flash/leds-qcom-flash.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c
index 29cf09479422..a73d3ea5c97a 100644
--- a/drivers/leds/flash/leds-qcom-flash.c
+++ b/drivers/leds/flash/leds-qcom-flash.c
@@ -749,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 [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/3] leds-qcom-flash: several tiny fixes
2023-07-25 9:57 [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Fenglin Wu
` (2 preceding siblings ...)
2023-07-25 9:57 ` [PATCH v2 3/3] leds: flash: leds-qcom-flash: put child node if registration failed Fenglin Wu
@ 2023-07-28 11:17 ` Lee Jones
3 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2023-07-28 11:17 UTC (permalink / raw)
To: linux-arm-msm, Pavel Machek, Lee Jones, Fenglin Wu
Cc: linux-leds, linux-kernel
On Tue, 25 Jul 2023 17:57:18 +0800, Fenglin Wu wrote:
> Add small changes to address the review comments from Paval which were
> posted after the driver was applied:
> https://lore.kernel.org/linux-arm-msm/20230325170957.GA2904@bug/#t
> https://lore.kernel.org/linux-arm-msm/ZB8wbv93+Vmx3trt@duo.ucw.cz/
>
> 1) Add a sentence in Kconfig to explain the driver can be compiled as a
> module
> 2) Strobe off the LED channel before setting flash current
> 3) Put the child node while register flash LED device failed.
>
> [...]
Applied, thanks!
[1/3] leds: flash: leds-qcom-flash: declare the driver as a module
commit: 05a576059ac23355a86e4be058cb43997d83c7fd
[2/3] leds: flash: leds-qcom-flash: turn off LED before setting flash current
commit: 7c47381c8664d55861036d1d858daf5e9d5d67b8
[3/3] leds: flash: leds-qcom-flash: put child node if registration failed
commit: 546924102de8327a5b2095d2134faed6de971476
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-28 11:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 9:57 [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 1/3] leds: flash: leds-qcom-flash: declare the driver as a module Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 2/3] leds: flash: leds-qcom-flash: turn off LED before setting flash current Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 3/3] leds: flash: leds-qcom-flash: put child node if registration failed Fenglin Wu
2023-07-28 11:17 ` [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®