From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Fenglin Wu" <quic_fenglinw@quicinc.com>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<krzysztof.kozlowski@linaro.org>
Cc: <quic_collinsd@quicinc.com>, <quic_subbaram@quicinc.com>
Subject: Re: [PATCH v3 0/2] Add LED driver for flash module in QCOM PMICs
Date: Wed, 19 Oct 2022 09:23:56 +0200 [thread overview]
Message-ID: <CNPPXFMBHOPK.2XSBJT5M1TNVP@otso> (raw)
In-Reply-To: <20221018014024.948731-1-quic_fenglinw@quicinc.com>
Hi Fenglin,
On Tue Oct 18, 2022 at 3:40 AM CEST, Fenglin Wu wrote:
> Initial driver and binding document changes for supporting flash LED
> module in Qualcomm Technologies, Inc. PMICs.
>
Thanks for these patches, it's really nice to see drivers like this
being sent upstream!
I've just tried these patches on pm6150l which also is compatible with
this driver (and used on sm7225-fairphone-fp4).
The two different flash LEDs on the device I could adjust as expected
using sysfs:
$ echo 255 > /sys/class/leds/yellow:flash-0/brightness
$ echo 255 > /sys/class/leds/white:flash-0/brightness
Also lower brightness values resulted in lower brightness on the LED, so
all is good here!
But for flash usage, I couldn't figure out how to use it, doing the
following resulted in no change on the LED.
$ cat /sys/class/leds/white:flash-0/max_flash_brightness
1000000
$ echo 1000000 > /sys/class/leds/white:flash-0/flash_brightness
Here's my LED definition:
led-0 {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_YELLOW>;
led-sources = <1>;
led-max-microamp = <180000>;
flash-max-microamp = <1000000>;
flash-max-timeout-us = <1280000>;
};
From values are from msm-4.19 kernel:
qcom,flash_0 {
qcom,current-ma = <1000>; // => flash-max-microamp
qcom,duration-ms = <1280>; // => flash-max-timeout-us
qcom,id = <0>; // => led-sources?
};
qcom,torch_0 {
qcom,current-ma = <180>; // => led-max-microamp
qcom,id = <0>; // => led-sources?
};
Could you please let me know how flash is supposed to work or if I
maybe have messed up some setting here?
Regards
Luca
> Changes in V3:
> 1. Updated the driver to use regmap_field for register access.
> 2. Adressed the review comments in binding document change.
>
> Changes in V2:
> 1. Addressed review comments in binding change, thanks Krzysztof!
> 2. Updated driver to address the compilation issue reported by
> kernel test robot.
>
>
> Fenglin Wu (2):
> leds: flash: add driver to support flash LED module in QCOM PMICs
> dt-bindings: add bindings for QCOM flash LED
>
> .../bindings/leds/qcom,spmi-flash-led.yaml | 116 +++
> drivers/leds/flash/Kconfig | 15 +
> drivers/leds/flash/Makefile | 1 +
> drivers/leds/flash/leds-qcom-flash.c | 700 ++++++++++++++++++
> 4 files changed, 832 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml
> create mode 100644 drivers/leds/flash/leds-qcom-flash.c
>
> --
> 2.25.1
next prev parent reply other threads:[~2022-10-19 7:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 1:40 Fenglin Wu
2022-10-18 1:40 ` [PATCH v3 1/2] leds: flash: add driver to support flash LED " Fenglin Wu
2022-10-18 1:40 ` [PATCH v3 2/2] dt-bindings: add bindings for QCOM flash LED Fenglin Wu
2022-10-19 13:36 ` Krzysztof Kozlowski
2022-10-20 6:33 ` Fenglin Wu
2022-10-19 7:23 ` Luca Weiss [this message]
2022-10-19 10:17 ` [PATCH v3 0/2] Add LED driver for flash module in QCOM PMICs Fenglin Wu
2022-10-19 11:09 ` Luca Weiss
2022-10-19 10:19 ` Fenglin Wu
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=CNPPXFMBHOPK.2XSBJT5M1TNVP@otso \
--to=luca.weiss@fairphone.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_collinsd@quicinc.com \
--cc=quic_fenglinw@quicinc.com \
--cc=quic_subbaram@quicinc.com \
/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
all inboxes | Powered by JetHome®