[PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED

Lin, Meng-Bo posted 1 patch 2 years, 9 months ago
.../dts/qcom/msm8916-wingtech-wt88047.dts     | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
[PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED
Posted by Lin, Meng-Bo 2 years, 9 months ago
WT88047 uses OCP 8110 Flash LED driver. Add it to the device tree.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 .../dts/qcom/msm8916-wingtech-wt88047.dts     | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
index 166bed05996f..a87be1d95b14 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
@@ -23,6 +23,20 @@ chosen {
 		stdout-path = "serial0";
 	};
 
+	flash-led-controller {
+		compatible = "ocs,ocp8110";
+		enable-gpios = <&msmgpio 31 GPIO_ACTIVE_HIGH>;
+		flash-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&camera_flash_default>;
+
+		flash_led: led {
+			function = LED_FUNCTION_FLASH;
+			color = <LED_COLOR_ID_WHITE>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -274,6 +288,14 @@ l18 {
 };
 
 &msmgpio {
+	camera_flash_default: camera-flash-default-state {
+		pins = "gpio31", "gpio32";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	gpio_keys_default: gpio-keys-default-state {
 		pins = "gpio107";
 		function = "gpio";
-- 
2.36.3
Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED
Posted by Bjorn Andersson 2 years, 9 months ago
On Mon, 28 Nov 2022 05:16:32 +0000, Lin, Meng-Bo wrote:
> WT88047 uses OCP 8110 Flash LED driver. Add it to the device tree.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED
      commit: 8b607c57655154ce4516d5d195bd174e6f0bede0

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>
Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED
Posted by Krzysztof Kozlowski 2 years, 9 months ago
On 28/11/2022 06:16, Lin, Meng-Bo wrote:
> WT88047 uses OCP 8110 Flash LED driver. Add it to the device tree.
> 
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED
Posted by Krzysztof Kozlowski 2 years, 9 months ago
On 28/11/2022 06:16, Lin, Meng-Bo wrote:
> WT88047 uses OCP 8110 Flash LED driver. Add it to the device tree.
> 
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
> ---
>  .../dts/qcom/msm8916-wingtech-wt88047.dts     | 22 +++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
> index 166bed05996f..a87be1d95b14 100644
> --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
> +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
> @@ -23,6 +23,20 @@ chosen {
>  		stdout-path = "serial0";
>  	};
>  
> +	flash-led-controller {
> +		compatible = "ocs,ocp8110";

The compatible is not documented. Checkpatch warns about it. You need to
document devices before using them.

Best regards,
Krzysztof
Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED
Posted by Stephan Gerhold 2 years, 9 months ago
Hi Krzysztof,

On Mon, Nov 28, 2022 at 09:56:47AM +0100, Krzysztof Kozlowski wrote:
> On 28/11/2022 06:16, Lin, Meng-Bo wrote:
> > WT88047 uses OCP 8110 Flash LED driver. Add it to the device tree.
> > 
> > Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
> > ---
> >  .../dts/qcom/msm8916-wingtech-wt88047.dts     | 22 +++++++++++++++++++
> >  1 file changed, 22 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
> > index 166bed05996f..a87be1d95b14 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
> > +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
> > @@ -23,6 +23,20 @@ chosen {
> >  		stdout-path = "serial0";
> >  	};
> >  
> > +	flash-led-controller {
> > +		compatible = "ocs,ocp8110";
> 
> The compatible is not documented. Checkpatch warns about it. You need to
> document devices before using them.
> 

Unfortunately Pavel never applied the dt-bindings patch for this - only
the driver patch was applied. André already sent a kind reminder [1] and
two resends [2, 3] without success. Since it's a documentation-only
patch, maybe you could take it through the dt-bindings tree?

Even the original version [1] still applies cleanly to linux-next. :)

Thanks,
Stephan

[1]: https://lore.kernel.org/linux-leds/20220212180942.8241-2-git@apitzsch.eu/
[2]: https://lore.kernel.org/linux-leds/20220404161428.17175-1-git@apitzsch.eu/
[3]: https://lore.kernel.org/linux-leds/20220505185344.10067-1-git@apitzsch.eu/
Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED
Posted by Krzysztof Kozlowski 2 years, 9 months ago
On 28/11/2022 19:30, Stephan Gerhold wrote:
> Hi Krzysztof,
> 
> On Mon, Nov 28, 2022 at 09:56:47AM +0100, Krzysztof Kozlowski wrote:
>> On 28/11/2022 06:16, Lin, Meng-Bo wrote:
>>> WT88047 uses OCP 8110 Flash LED driver. Add it to the device tree.
>>>
>>> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
>>> ---
>>>  .../dts/qcom/msm8916-wingtech-wt88047.dts     | 22 +++++++++++++++++++
>>>  1 file changed, 22 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
>>> index 166bed05996f..a87be1d95b14 100644
>>> --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
>>> +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
>>> @@ -23,6 +23,20 @@ chosen {
>>>  		stdout-path = "serial0";
>>>  	};
>>>  
>>> +	flash-led-controller {
>>> +		compatible = "ocs,ocp8110";
>>
>> The compatible is not documented. Checkpatch warns about it. You need to
>> document devices before using them.
>>
> 
> Unfortunately Pavel never applied the dt-bindings patch for this - only
> the driver patch was applied. André already sent a kind reminder [1] and
> two resends [2, 3] without success. Since it's a documentation-only
> patch, maybe you could take it through the dt-bindings tree?
> 

I'll ping Rob. Other way is to resend. You need to keep resending (maybe
together with DTS in such case) before this can go in.

Best regards,
Krzysztof

Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED
Posted by Krzysztof Kozlowski 2 years, 9 months ago
On 28/11/2022 22:23, Krzysztof Kozlowski wrote:
> On 28/11/2022 19:30, Stephan Gerhold wrote:
>> Hi Krzysztof,
>>
>> On Mon, Nov 28, 2022 at 09:56:47AM +0100, Krzysztof Kozlowski wrote:
>>> On 28/11/2022 06:16, Lin, Meng-Bo wrote:
>>>> WT88047 uses OCP 8110 Flash LED driver. Add it to the device tree.
>>>>
>>>> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
>>>> ---
>>>>  .../dts/qcom/msm8916-wingtech-wt88047.dts     | 22 +++++++++++++++++++
>>>>  1 file changed, 22 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
>>>> index 166bed05996f..a87be1d95b14 100644
>>>> --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
>>>> @@ -23,6 +23,20 @@ chosen {
>>>>  		stdout-path = "serial0";
>>>>  	};
>>>>  
>>>> +	flash-led-controller {
>>>> +		compatible = "ocs,ocp8110";
>>>
>>> The compatible is not documented. Checkpatch warns about it. You need to
>>> document devices before using them.
>>>
>>
>> Unfortunately Pavel never applied the dt-bindings patch for this - only
>> the driver patch was applied. André already sent a kind reminder [1] and
>> two resends [2, 3] without success. Since it's a documentation-only
>> patch, maybe you could take it through the dt-bindings tree?
>>
> 
> I'll ping Rob. Other way is to resend. You need to keep resending (maybe
> together with DTS in such case) before this can go in.

Applied by Rob:
https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=for-next&id=876c881f9f416f1a9071a80fb7daefe19c51186e

Best regards,
Krzysztof