dt-bindings: input: Convert ti,drv260x to DT schema

Convert the drv260x haptics binding to DT schema format.

The only notable change from .txt format is that vbat-supply is not
actually required, so don't make it a required property.

Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221118174831.69793-1-luca@z3ntu.xyz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Luca Weiss and committed by
Dmitry Torokhov
39cb018a c4a5bcae

+109 -50
-50
Documentation/devicetree/bindings/input/ti,drv260x.txt
··· 1 - * Texas Instruments - drv260x Haptics driver family 2 - 3 - Required properties: 4 - - compatible - One of: 5 - "ti,drv2604" - DRV2604 6 - "ti,drv2605" - DRV2605 7 - "ti,drv2605l" - DRV2605L 8 - - reg - I2C slave address 9 - - vbat-supply - Required supply regulator 10 - - mode - Power up mode of the chip (defined in include/dt-bindings/input/ti-drv260x.h) 11 - DRV260X_LRA_MODE - Linear Resonance Actuator mode (Piezoelectric) 12 - DRV260X_LRA_NO_CAL_MODE - This is a LRA Mode but there is no calibration 13 - sequence during init. And the device is configured for real 14 - time playback mode (RTP mode). 15 - DRV260X_ERM_MODE - Eccentric Rotating Mass mode (Rotary vibrator) 16 - - library-sel - These are ROM based waveforms pre-programmed into the IC. 17 - This should be set to set the library to use at power up. 18 - (defined in include/dt-bindings/input/ti-drv260x.h) 19 - DRV260X_LIB_EMPTY - Do not use a pre-programmed library 20 - DRV260X_ERM_LIB_A - Pre-programmed Library 21 - DRV260X_ERM_LIB_B - Pre-programmed Library 22 - DRV260X_ERM_LIB_C - Pre-programmed Library 23 - DRV260X_ERM_LIB_D - Pre-programmed Library 24 - DRV260X_ERM_LIB_E - Pre-programmed Library 25 - DRV260X_ERM_LIB_F - Pre-programmed Library 26 - DRV260X_LIB_LRA - Pre-programmed LRA Library 27 - 28 - Optional properties: 29 - - enable-gpio - gpio pin to enable/disable the device. 30 - - vib-rated-mv - The rated voltage of the actuator in millivolts. 31 - If this is not set then the value will be defaulted to 32 - 3.2 v. 33 - - vib-overdrive-mv - The overdrive voltage of the actuator in millivolts. 34 - If this is not set then the value will be defaulted to 35 - 3.2 v. 36 - Example: 37 - 38 - haptics: haptics@5a { 39 - compatible = "ti,drv2605l"; 40 - reg = <0x5a>; 41 - vbat-supply = <&vbat>; 42 - enable-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; 43 - mode = <DRV260X_LRA_MODE>; 44 - library-sel = <DRV260X_LIB_LRA>; 45 - vib-rated-mv = <3200>; 46 - vib-overdrive-mv = <3200>; 47 - } 48 - 49 - For more product information please see the link below: 50 - http://www.ti.com/product/drv2605
+109
Documentation/devicetree/bindings/input/ti,drv260x.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/input/ti,drv260x.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments - drv260x Haptics driver family 8 + 9 + maintainers: 10 + - Andrew Davis <afd@ti.com> 11 + 12 + properties: 13 + compatible: 14 + enum: 15 + - ti,drv2604 16 + - ti,drv2605 17 + - ti,drv2605l 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + vbat-supply: 23 + description: Power supply to the haptic motor 24 + 25 + # TODO: Deprecate 'mode' in favor of differently named property 26 + mode: 27 + $ref: /schemas/types.yaml#/definitions/uint32 28 + description: | 29 + Power up mode of the chip 30 + (defined in include/dt-bindings/input/ti-drv260x.h) 31 + 32 + DRV260X_LRA_MODE 33 + Linear Resonance Actuator mode (Piezoelectric) 34 + 35 + DRV260X_LRA_NO_CAL_MODE 36 + This is a LRA Mode but there is no calibration sequence during init. 37 + And the device is configured for real time playback mode (RTP mode). 38 + 39 + DRV260X_ERM_MODE 40 + Eccentric Rotating Mass mode (Rotary vibrator) 41 + enum: [ 0, 1, 2 ] 42 + 43 + library-sel: 44 + $ref: /schemas/types.yaml#/definitions/uint32 45 + description: | 46 + These are ROM based waveforms pre-programmed into the IC. 47 + This should be set to set the library to use at power up. 48 + (defined in include/dt-bindings/input/ti-drv260x.h) 49 + 50 + DRV260X_LIB_EMPTY - Do not use a pre-programmed library 51 + DRV260X_ERM_LIB_A - Pre-programmed Library 52 + DRV260X_ERM_LIB_B - Pre-programmed Library 53 + DRV260X_ERM_LIB_C - Pre-programmed Library 54 + DRV260X_ERM_LIB_D - Pre-programmed Library 55 + DRV260X_ERM_LIB_E - Pre-programmed Library 56 + DRV260X_ERM_LIB_F - Pre-programmed Library 57 + DRV260X_LIB_LRA - Pre-programmed LRA Library 58 + enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ] 59 + 60 + enable-gpio: 61 + maxItems: 1 62 + deprecated: true 63 + 64 + enable-gpios: 65 + maxItems: 1 66 + 67 + vib-rated-mv: 68 + $ref: /schemas/types.yaml#/definitions/uint32 69 + description: | 70 + The rated voltage of the actuator in millivolts. 71 + If this is not set then the value will be defaulted to 3200 mV. 72 + default: 3200 73 + 74 + vib-overdrive-mv: 75 + $ref: /schemas/types.yaml#/definitions/uint32 76 + description: | 77 + The overdrive voltage of the actuator in millivolts. 78 + If this is not set then the value will be defaulted to 3200 mV. 79 + default: 3200 80 + 81 + required: 82 + - compatible 83 + - reg 84 + - enable-gpios 85 + - mode 86 + - library-sel 87 + 88 + additionalProperties: false 89 + 90 + examples: 91 + - | 92 + #include <dt-bindings/gpio/gpio.h> 93 + #include <dt-bindings/input/ti-drv260x.h> 94 + 95 + i2c { 96 + #address-cells = <1>; 97 + #size-cells = <0>; 98 + 99 + haptics@5a { 100 + compatible = "ti,drv2605l"; 101 + reg = <0x5a>; 102 + vbat-supply = <&vbat>; 103 + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; 104 + mode = <DRV260X_LRA_MODE>; 105 + library-sel = <DRV260X_LIB_LRA>; 106 + vib-rated-mv = <3200>; 107 + vib-overdrive-mv = <3200>; 108 + }; 109 + };