diff mbox series

arm64: dts: mediatek: mt8173-elm-hana: Add vdd-supply to second source trackpad

Message ID 20241008082051.4002438-1-wenst@chromium.org (mailing list archive)
State New
Headers show
Series arm64: dts: mediatek: mt8173-elm-hana: Add vdd-supply to second source trackpad | expand

Commit Message

Chen-Yu Tsai Oct. 8, 2024, 8:20 a.m. UTC
The Hana device has a second source option trackpad, but it is missing
its regulator supply. It only works because the regulator is marked as
always-on.

Add the regulator supply, and the required post-power-on delay.

Fixes: 689b937bedde ("arm64: dts: mediatek: add mt8173 elm and hana board")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
 arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

AngeloGioacchino Del Regno Oct. 8, 2024, 8:47 a.m. UTC | #1
Il 08/10/24 10:20, Chen-Yu Tsai ha scritto:
> The Hana device has a second source option trackpad, but it is missing
> its regulator supply. It only works because the regulator is marked as
> always-on.
> 
> Add the regulator supply, and the required post-power-on delay.
> 
> Fixes: 689b937bedde ("arm64: dts: mediatek: add mt8173 elm and hana board")
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
>   arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
> index 8d1cbc92bce3..e03474702cad 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
> @@ -49,6 +49,12 @@ trackpad2: trackpad@2c {
>   		interrupts-extended = <&pio 117 IRQ_TYPE_LEVEL_LOW>;
>   		reg = <0x2c>;
>   		hid-descr-addr = <0x0020>;
> +		/*
> +		 * The supply is always on. Adding the delay here
> +		 * needlessly delays the readiness of the trackpad.

I'd say, let's be nice in this comment and let's explain the whole situation:

The trackpad needs a post power on delay of 100ms but, at the time
of writing, the power supply for it on this board is set as always-on,
so we don't add that to avoid useless delays in the readiness of this device.


...or....

The trackpad needs a post power on delay of 100ms but the power supply for
it on this board is always-on (and will always be), so we don't add delays
to avoid impacting on the time required for readiness of this device.

> +		 */
> +		/* post-power-on-delay-ms = <100>; */

Then you can remove this commented out property ;-)

P.S.: Just to be clear, what I dislike is to see a property that is commented out.

Cheers,
Angelo

> +		vdd-supply = <&mt6397_vgp6_reg>;
>   		wakeup-source;
>   	};
>   };
Chen-Yu Tsai Oct. 8, 2024, 10:19 a.m. UTC | #2
On Tue, Oct 8, 2024 at 4:47 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Il 08/10/24 10:20, Chen-Yu Tsai ha scritto:
> > The Hana device has a second source option trackpad, but it is missing
> > its regulator supply. It only works because the regulator is marked as
> > always-on.
> >
> > Add the regulator supply, and the required post-power-on delay.
> >
> > Fixes: 689b937bedde ("arm64: dts: mediatek: add mt8173 elm and hana board")
> > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > ---
> >   arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi | 6 ++++++
> >   1 file changed, 6 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
> > index 8d1cbc92bce3..e03474702cad 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
> > +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
> > @@ -49,6 +49,12 @@ trackpad2: trackpad@2c {
> >               interrupts-extended = <&pio 117 IRQ_TYPE_LEVEL_LOW>;
> >               reg = <0x2c>;
> >               hid-descr-addr = <0x0020>;
> > +             /*
> > +              * The supply is always on. Adding the delay here
> > +              * needlessly delays the readiness of the trackpad.
>
> I'd say, let's be nice in this comment and let's explain the whole situation:
>
> The trackpad needs a post power on delay of 100ms but, at the time
> of writing, the power supply for it on this board is set as always-on,
> so we don't add that to avoid useless delays in the readiness of this device.
>
>
> ...or....
>
> The trackpad needs a post power on delay of 100ms but the power supply for
> it on this board is always-on (and will always be), so we don't add delays
> to avoid impacting on the time required for readiness of this device.
>
> > +              */
> > +             /* post-power-on-delay-ms = <100>; */
>
> Then you can remove this commented out property ;-)
>
> P.S.: Just to be clear, what I dislike is to see a property that is commented out.

Got it. Will rewrite. :D

ChenYu
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
index 8d1cbc92bce3..e03474702cad 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
@@ -49,6 +49,12 @@  trackpad2: trackpad@2c {
 		interrupts-extended = <&pio 117 IRQ_TYPE_LEVEL_LOW>;
 		reg = <0x2c>;
 		hid-descr-addr = <0x0020>;
+		/*
+		 * The supply is always on. Adding the delay here
+		 * needlessly delays the readiness of the trackpad.
+		 */
+		/* post-power-on-delay-ms = <100>; */
+		vdd-supply = <&mt6397_vgp6_reg>;
 		wakeup-source;
 	};
 };