Skip to contentSkip to conversation

input: misc: Add TI drv2665 haptics driver

PATCH In review Dan Murphy 2 participants 2 messages May 8, 2015 – May 9, 2015

Subsystems (3)
lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

PATCH 1/1 input: misc: Add TI drv2665 haptics driver

Add the TI drv2665 piezo haptic driver.
This haptics IC requires the data to be
streamed to the FIFO for continuous output.

Datasheet can be found at:
http://www.ti.com/product/drv2665

---
 .../devicetree/bindings/input/ti,drv2665.txt       |  17 +
 drivers/input/misc/Kconfig                         |  11 +
 drivers/input/misc/Makefile                        |   1 +
 drivers/input/misc/drv2665.c                       | 357 +++++++++++++++++++++
 4 files changed, 386 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/ti,drv2665.txt
 create mode 100644 drivers/input/misc/drv2665.c
Documentation/devicetree/bindings/input/ti,drv2665.txt new file +17 -0
new file mode 100644
index 0000000..1ba97ac
@@ -0,0 +1,17 @@
+* Texas Instruments - drv2665 Haptics driver
+
+Required properties:
+	- compatible - "ti,drv2665" - DRV2665
+	- reg -  I2C slave address
+	- vbat-supply - Required supply regulator
+
+Example:
+
+haptics: haptics@59 {
+	compatible = "ti,drv2665";
+	reg = <0x59>;
+	vbat-supply = <&vbat>;
+};
+
+For more product information please see the link below:
+http://www.ti.com/product/drv2665
drivers/input/misc/Kconfig +11 -0
index 7838f1a..e5c4de2 100644
@@ -775,6 +775,17 @@ config INPUT_DRV260X_HAPTICS
 	  To compile this driver as a module, choose M here: the
 	  module will be called drv260x-haptics.
 
+config INPUT_DRV2665_HAPTICS
+	tristate "TI DRV2665 haptics support"
+	depends on INPUT && I2C
+	select INPUT_FF_MEMLESS
+	select REGMAP_I2C
+	help
+	  Say Y to enable support for the TI DRV2665 haptics driver.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called drv2665-haptics.
+
 config INPUT_DRV2667_HAPTICS
 	tristate "TI DRV2667 haptics support"
 	depends on INPUT && I2C
drivers/input/misc/Makefile +1 -0
index 78ba4c1..d317947 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_INPUT_DA9055_ONKEY)	+= da9055_onkey.o
 obj-$(CONFIG_INPUT_DM355EVM)		+= dm355evm_keys.o
 obj-$(CONFIG_INPUT_E3X0_BUTTON)		+= e3x0-button.o
 obj-$(CONFIG_INPUT_DRV260X_HAPTICS)	+= drv260x.o
+obj-$(CONFIG_INPUT_DRV2665_HAPTICS)	+= drv2665.o
 obj-$(CONFIG_INPUT_DRV2667_HAPTICS)	+= drv2667.o
 obj-$(CONFIG_INPUT_GP2A)		+= gp2ap002a00f.o
 obj-$(CONFIG_INPUT_GPIO_BEEPER)		+= gpio-beeper.o
drivers/input/misc/drv2665.c new file +357 -0

357 lines not on this page · raw message

Signature · 1 line
1.9.1
maintainer
#1 lore raw

Hi Dan,

drivers/input/misc/drv2665.c line 72

Quoted 5 lines · Dan Murphy
drivers/input/misc/drv2665.c new file +5 -0
+
+/* 8kHz Sine wave to stream to the FIFO */
+struct drv2665_waveform {
+	u8 data;
+} sine_wave_form[] = {

I changed this into

static const u8 drv2665_sine_wave_form[] = {
...
};

and applied (together with the other 2 patches).

Thanks.

Signature · 1 line
Dmitry