2022-11-28 05:45:22

by Lin, Meng-Bo

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

WT88047 uses OCP 8110 Flash LED driver. Add it to the device tree.

Signed-off-by: Lin, Meng-Bo <[email protected]>
---
.../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



2022-11-28 09:25:05

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED

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 <[email protected]>
> ---
> .../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

2022-11-28 19:49:44

by Stephan Gerhold

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED

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 <[email protected]>
> > ---
> > .../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/[email protected]/
[2]: https://lore.kernel.org/linux-leds/[email protected]/
[3]: https://lore.kernel.org/linux-leds/[email protected]/

2022-11-28 21:41:25

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED

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 <[email protected]>
>>> ---
>>> .../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

2022-11-28 21:44:38

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED

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 <[email protected]>
>>>> ---
>>>> .../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

2022-11-28 21:44:45

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED

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 <[email protected]>


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2022-12-06 18:36:26

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED

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 <[email protected]>