Message ID | 20200222231428.233621-4-megous@megous.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add support for vibrator motor for TBS A711 Tablet | expand |
Hi, On Sun, Feb 23, 2020 at 12:14:27AM +0100, Ondrej Jirman wrote: > The board has a vibrator mottor. Hook it to the input subsystem. > > Signed-off-by: Ondrej Jirman <megous@megous.com> > --- > arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > index 2fd31a0a0b344..a22920275e99b 100644 > --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > @@ -99,6 +99,11 @@ panel_input: endpoint { > }; > }; > > + vibrator { > + compatible = "gpio-vibrator"; > + vcc-supply = <®_ldo_io1>; > + }; > + LDO IO1 can also be muxed in as a GPIO iirc, why did you choose the regulator instead? Maxime
Hello, On Mon, Feb 24, 2020 at 10:10:59AM +0100, Maxime Ripard wrote: > Hi, > > On Sun, Feb 23, 2020 at 12:14:27AM +0100, Ondrej Jirman wrote: > > The board has a vibrator mottor. Hook it to the input subsystem. > > > > Signed-off-by: Ondrej Jirman <megous@megous.com> > > --- > > arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > > index 2fd31a0a0b344..a22920275e99b 100644 > > --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > > +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > > @@ -99,6 +99,11 @@ panel_input: endpoint { > > }; > > }; > > > > + vibrator { > > + compatible = "gpio-vibrator"; > > + vcc-supply = <®_ldo_io1>; > > + }; > > + > > LDO IO1 can also be muxed in as a GPIO iirc, why did you choose the > regulator instead? According to the specification, LDO needs to be enabled (value 0b11) to achieve the specified max driving current of 150mA: https://megous.com/dl/tmp/92b7d9d94820c3ba.png Otherwise the chip is probably just using the regular CMOS logic output (typically limited to around 20-35mA, but not specified in this datasheet), which would be probably overdriven, if we try to drive the motor with it. And since we're driving a motor directly, the more the better. thank you and regards, o. > Maxime
On Mon, Feb 24, 2020 at 03:14:37PM +0100, Ondřej Jirman wrote: > Hello, > > On Mon, Feb 24, 2020 at 10:10:59AM +0100, Maxime Ripard wrote: > > Hi, > > > > On Sun, Feb 23, 2020 at 12:14:27AM +0100, Ondrej Jirman wrote: > > > The board has a vibrator mottor. Hook it to the input subsystem. > > > > > > Signed-off-by: Ondrej Jirman <megous@megous.com> > > > --- > > > arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > > > index 2fd31a0a0b344..a22920275e99b 100644 > > > --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > > > +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > > > @@ -99,6 +99,11 @@ panel_input: endpoint { > > > }; > > > }; > > > > > > + vibrator { > > > + compatible = "gpio-vibrator"; > > > + vcc-supply = <®_ldo_io1>; > > > + }; > > > + > > > > LDO IO1 can also be muxed in as a GPIO iirc, why did you choose the > > regulator instead? > > According to the specification, LDO needs to be enabled (value 0b11) > to achieve the specified max driving current of 150mA: > > https://megous.com/dl/tmp/92b7d9d94820c3ba.png > > Otherwise the chip is probably just using the regular CMOS logic output > (typically limited to around 20-35mA, but not specified in this datasheet), > which would be probably overdriven, if we try to drive the motor with it. > > And since we're driving a motor directly, the more the better. Ok, that works for me then. This is typically the kind of things that should be in your commit log though, since it's basically the motivation for doing what you're doing in your patches. Maxime
diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts index 2fd31a0a0b344..a22920275e99b 100644 --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts @@ -99,6 +99,11 @@ panel_input: endpoint { }; }; + vibrator { + compatible = "gpio-vibrator"; + vcc-supply = <®_ldo_io1>; + }; + reg_gps: reg-gps { compatible = "regulator-fixed"; regulator-name = "gps";
The board has a vibrator mottor. Hook it to the input subsystem. Signed-off-by: Ondrej Jirman <megous@megous.com> --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 5 +++++ 1 file changed, 5 insertions(+)