mbox series

[v5,0/4] Add support for vibrator motor for TBS A711 Tablet

Message ID 20200730132446.3139980-1-megous@megous.com
Headers show
Series Add support for vibrator motor for TBS A711 Tablet | expand

Message

Ondřej Jirman July 30, 2020, 1:24 p.m. UTC
The tablet has a vibrator motor. This patch series exposes it via
input subsystem (EV_FF).

I'd like to ask input maintainers to take the patches 1 and 2.
Patches 3 and 4 should go via the sunxi tree.

The change to the vibrator driver is meant to enable toggling the
vibrator motor just via a power supply itself. There's not additional
gpio driven switch on this tablet between the power supply for the
motor and the motor.

Please take a look.

Changes in v5:
- Fix probe without a power supply (Dmitry)

Changes in v4:
- Added DT reviewed-by tag
- Fixed motor typo

Changes in v3:
- Changed dt-binding to require at least one of enable/supply, dropped ack
- Changed driver to bail out if neither supply nor gpio is given

Changes in v2:
- Added DT ack tag
- Add more information to the commit log (re use of LDO for the power)


thank you and regards,
  Ondrej Jirman

Ondrej Jirman (4):
  dt-bindings: input: gpio-vibrator: Don't require enable-gpios
  input: gpio-vibra: Allow to use vcc-supply alone to control the
    vibrator
  ARM: dts: sun8i-a83t-tbs-a711: Add support for the vibrator motor
  ARM: dts: sun8i-a83t-tbs-a711: Increase voltage on the vibrator

 .../bindings/input/gpio-vibrator.yaml          |  7 ++++++-
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts      |  9 +++++++--
 drivers/input/misc/gpio-vibra.c                | 18 +++++++++++++-----
 3 files changed, 26 insertions(+), 8 deletions(-)

Comments

Marco Felsch July 31, 2020, 5:41 a.m. UTC | #1
Hi Ondrej,

On 20-07-30 15:24, Ondrej Jirman wrote:
> The board has a vibrator motor. Hook it to the input subsystem.
> 
> According to the PMIC specification, LDO needs to be enabled (value 0b11)
> to achieve the specified max driving current of 150mA. We can't drive
> the motor with just GPIO mode.
> 
> In GPIO mode the chip is probably just using the regular CMOS logic
> output circuitry (typically limited to around 20-35mA, but not specified
> in this datasheet).
> 
> 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 bfc9bb277a49..a278a1e33930 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 = <&reg_ldo_io1>;
> +	};

Please keep the alphabetical order. I also would merge patch 3 and 4
into one since they are realted changes.

Regards,
  Marco

> +
>  	reg_gps: reg-gps {
>  		compatible = "regulator-fixed";
>  		regulator-name = "gps";