diff mbox series

arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED

Message ID 20221128051512.125148-1-linmengbo0689@protonmail.com (mailing list archive)
State Accepted
Commit 8b607c57655154ce4516d5d195bd174e6f0bede0
Headers show
Series arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED | expand

Commit Message

Lin, Meng-Bo Nov. 28, 2022, 5:16 a.m. UTC
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(+)

Comments

Krzysztof Kozlowski Nov. 28, 2022, 8:56 a.m. UTC | #1
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
Stephan Gerhold Nov. 28, 2022, 6:30 p.m. UTC | #2
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/
Krzysztof Kozlowski Nov. 28, 2022, 9:23 p.m. UTC | #3
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
Krzysztof Kozlowski Nov. 28, 2022, 9:29 p.m. UTC | #4
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
Krzysztof Kozlowski Nov. 28, 2022, 9:30 p.m. UTC | #5
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
Bjorn Andersson Dec. 6, 2022, 6:19 p.m. UTC | #6
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,
diff mbox series

Patch

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";