Skip to content

Commit

Permalink
Input: drv260x - add TI drv260x haptics driver
Browse files Browse the repository at this point in the history
Add the TI drv260x haptics/vibrator driver.  This device uses the input
force feedback to produce a wave form to driver an ERM or LRA actuator
device.

The initial driver supports the devices real time playback mode.  But the
device has additional wave patterns in ROM. This functionality will be
added in future patchsets.

Product data sheet is located here: http://www.ti.com/product/drv2605

Signed-off-by: Dan Murphy <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
Dan Murphy authored and dtor committed Aug 20, 2014
1 parent 3361a97 commit 7132fe4
Show file tree
Hide file tree
Showing 6 changed files with 865 additions and 0 deletions.
51 changes: 51 additions & 0 deletions Documentation/devicetree/bindings/input/ti,drv260x.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Texas Instruments - drv260x Haptics driver family

The drv260x family serial control bus communicates through I2C protocols

Required properties:
- compatible - One of:
"ti,drv2604" - DRV2604
"ti,drv2605" - DRV2605
"ti,drv2605l" - DRV2605L
- reg - I2C slave address
- vbat-supply - Required supply regulator
- mode - Power up mode of the chip (defined in include/dt-bindings/input/ti-drv260x.h)
DRV260X_LRA_MODE - Linear Resonance Actuator mode (Piezoelectric)
DRV260X_LRA_NO_CAL_MODE - This is a LRA Mode but there is no calibration
sequence during init. And the device is configured for real
time playback mode (RTP mode).
DRV260X_ERM_MODE - Eccentric Rotating Mass mode (Rotary vibrator)
- library-sel - These are ROM based waveforms pre-programmed into the IC.
This should be set to set the library to use at power up.
(defined in include/dt-bindings/input/ti-drv260x.h)
DRV260X_LIB_EMPTY - Do not use a pre-programmed library
DRV260X_ERM_LIB_A - Pre-programmed Library
DRV260X_ERM_LIB_B - Pre-programmed Library
DRV260X_ERM_LIB_C - Pre-programmed Library
DRV260X_ERM_LIB_D - Pre-programmed Library
DRV260X_ERM_LIB_E - Pre-programmed Library
DRV260X_ERM_LIB_F - Pre-programmed Library
DRV260X_LIB_LRA - Pre-programmed LRA Library

Optional properties:
- enable-gpio - gpio pin to enable/disable the device.
- vib-rated-mv - The rated voltage of the actuator in millivolts.
If this is not set then the value will be defaulted to
3.2 v.
- vib-overdrive-mv - The overdrive voltage of the actuator in millivolts.
If this is not set then the value will be defaulted to
3.2 v.
Example:

drv2605l: drv2605l@5a {
compatible = "ti,drv2605l";
reg = <0x5a>;
enable-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
mode = <DRV260X_LRA_MODE>;
library-sel = <DRV260X_LIB_LRA>;
vib-rated-mv = <3200>;
vib-overdriver-mv = <3200>;
};

For more product information please see the link below:
http://www.ti.com/product/drv2605
11 changes: 11 additions & 0 deletions drivers/input/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -676,4 +676,15 @@ config INPUT_SOC_BUTTON_ARRAY
To compile this driver as a module, choose M here: the
module will be called soc_button_array.

config INPUT_DRV260X_HAPTICS
tristate "TI DRV260X haptics support"
depends on INPUT && I2C && GPIOLIB
select INPUT_FF_MEMLESS
select REGMAP_I2C
help
Say Y to enable support for the TI DRV260X haptics driver.

To compile this driver as a module, choose M here: the
module will be called drv260x-haptics.

endif
1 change: 1 addition & 0 deletions drivers/input/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o
obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o
obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o
obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o
obj-$(CONFIG_INPUT_DRV260X_HAPTICS) += drv260x.o
obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o
obj-$(CONFIG_INPUT_GPIO_BEEPER) += gpio-beeper.o
obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o
Expand Down
Loading

0 comments on commit 7132fe4

Please sign in to comment.