devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Pavel Machek" <pavel@ucw.cz>
Cc: "Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Fenglin Wu" <quic_fenglinw@quicinc.com>,
	<linux-arm-msm@vger.kernel.org>, <linux-leds@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: configure flash LED
Date: Mon, 12 Dec 2022 14:59:07 +0100	[thread overview]
Message-ID: <COZW5FAXA36Z.175ARPIESQSLL@otso> (raw)
In-Reply-To: <Y5S+6j1yJ62RJU/v@duo.ucw.cz>

On Sat Dec 10, 2022 at 6:16 PM CET, Pavel Machek wrote:
> Hi!
>
> > Configure the pm6150l flash node for the dual flash LEDs found on FP4.
>
> > +&pm6150l_flash {
> > +	status = "okay";
> > +
> > +	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>;
> > +	};

Hi Pavel,

>
> I'm pretty sure the flash is not yellow.

The marketing term is Dual LED flash or Dual-tone flash, one LED is a
blue-ish white and one is a yellow-ish white, but from what I can tell,
in the original code it's always referred to as white and yellow so I
also followed that here.

Also the LEDs are right next to each other so in practise for torch just
both go on, and for camera flash I cannot really tell you but I guess
it's doing something there with the camera tuning.

See also this picture:
https://shop.fairphone.com/media/catalog/product/cache/b752d78484639b19641a8560800d919d/p/_/p_5b_main_camera_back.jpg

>
> Plus, how is the node in /sys/class/leds called? Can you make an entry
> in Documentation/leds/well-known-leds.txt and ensure the name stays
> consistent across devices?

/ # ls -al /sys/class/leds/white:flash/
total 0
drwxr-xr-x    3 0        0                0 Jan  1 00:00 .
drwxr-xr-x    4 0        0                0 Jan  1 00:00 ..
-rw-r--r--    1 0        0             4096 Jan  1 00:00 brightness
lrwxrwxrwx    1 0        0                0 Jan  1 00:00 device -> ../../../c440000.spmi:pmic@5:led-controller@d300
-rw-r--r--    1 0        0             4096 Jan  1 00:00 flash_brightness
-r--r--r--    1 0        0             4096 Jan  1 00:00 flash_fault
-rw-r--r--    1 0        0             4096 Jan  1 00:00 flash_strobe
-rw-r--r--    1 0        0             4096 Jan  1 00:00 flash_timeout
-r--r--r--    1 0        0             4096 Jan  1 00:00 max_brightness
-r--r--r--    1 0        0             4096 Jan  1 00:00 max_flash_brightness
-r--r--r--    1 0        0             4096 Jan  1 00:00 max_flash_timeout
drwxr-xr-x    2 0        0                0 Jan  1 00:00 power
lrwxrwxrwx    1 0        0                0 Jan  1 00:00 subsystem -> ../../../../../../../../../class/leds
-rw-r--r--    1 0        0             4096 Jan  1 00:00 uevent
/ # ls -al /sys/class/leds/yellow:flash/
total 0
drwxr-xr-x    3 0        0                0 Jan  1 00:00 .
drwxr-xr-x    4 0        0                0 Jan  1 00:00 ..
-rw-r--r--    1 0        0             4096 Jan  1 00:00 brightness
lrwxrwxrwx    1 0        0                0 Jan  1 00:00 device -> ../../../c440000.spmi:pmic@5:led-controller@d300
-rw-r--r--    1 0        0             4096 Jan  1 00:00 flash_brightness
-r--r--r--    1 0        0             4096 Jan  1 00:00 flash_fault
-rw-r--r--    1 0        0             4096 Jan  1 00:00 flash_strobe
-rw-r--r--    1 0        0             4096 Jan  1 00:00 flash_timeout
-r--r--r--    1 0        0             4096 Jan  1 00:00 max_brightness
-r--r--r--    1 0        0             4096 Jan  1 00:00 max_flash_brightness
-r--r--r--    1 0        0             4096 Jan  1 00:00 max_flash_timeout
drwxr-xr-x    2 0        0                0 Jan  1 00:00 power
lrwxrwxrwx    1 0        0                0 Jan  1 00:00 subsystem -> ../../../../../../../../../class/leds
-rw-r--r--    1 0        0             4096 Jan  1 00:00 uevent

There's also already flash LED on PinePhone and some MSM8916 devices,
but I think they also have white:flash based on the dt.

>
> Best regards,
> 								Pavel
> -- 
> People of Russia, stop Putin before his war on Ukraine escalates.


  reply	other threads:[~2022-12-12 13:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 13:54 [PATCH 0/3] Add PM6150L flash LED to Fairphone 4 Luca Weiss
2022-12-09 13:54 ` [PATCH 1/3] dt-bindings: leds: spmi-flash-led: Add pm6150l compatible Luca Weiss
2022-12-09 15:01   ` Krzysztof Kozlowski
2022-12-23 12:42   ` Lee Jones
2022-12-24 14:11     ` Krzysztof Kozlowski
2023-01-03 12:18       ` Lee Jones
2023-03-17  7:48         ` Luca Weiss
2023-03-17  7:51   ` Lee Jones
2022-12-09 13:54 ` [PATCH 2/3] arm64: dts: qcom: pm6150l: add spmi-flash-led node Luca Weiss
2022-12-10 12:32   ` Konrad Dybcio
2022-12-10 17:14   ` Pavel Machek
2022-12-09 13:54 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: configure flash LED Luca Weiss
2022-12-10 12:33   ` Konrad Dybcio
2022-12-10 17:16   ` Pavel Machek
2022-12-12 13:59     ` Luca Weiss [this message]
2023-01-05  3:30       ` Fenglin Wu
2023-03-23 19:54         ` Pavel Machek
2023-03-31  8:59           ` Luca Weiss
2022-12-28  4:36 ` (subset) [PATCH 0/3] Add PM6150L flash LED to Fairphone 4 Bjorn Andersson

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=COZW5FAXA36Z.175ARPIESQSLL@otso \
    --to=luca.weiss@fairphone.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=quic_fenglinw@quicinc.com \
    --cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).