Skip to contentSkip to conversation

input: drv2667: add support for drv2667 haptic driver

PATCH Superseded Dan Murphy 2 participants 8 messages Aug 21, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

Adding support for the TI DRV2667 haptic driver. This device driver a linear resonant actuator (LRA) based on user space requests to provide either a vibration or a haptic tactile response to an input.

This device has the ability to store wave patterns in RAM and these patterns can be executed based on user input.

For this initial series I added just the basic vibration pattern along that will continuously execute until the user indicates to stop.

[PATCH 1/2] doc: dt/bindings: input: introduce TI DRV2667 haptic [PATCH 2/2] input: misc: Add support for the DRV2667 haptic driver

author
#1 lore raw

PATCH 1/2 doc: dt/bindings: input: introduce TI DRV2667 haptic driver description

DRV2667 is a haptic/vibrator driver for Linear Resonant Actuators. Adding dt binding for this part

---
 .../devicetree/bindings/input/ti,drv2667.txt       |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/ti,drv2667.txt
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +18 -0
new file mode 100644
index 0000000..525216d
@@ -0,0 +1,18 @@
+Texas Instruments - drv2667 Haptics driver
+
+The drv2667 uses serial control bus communicates through I2C protocols
+
+Required properties:
+	- compatible - "ti,drv2667" - DRV2667
+	- reg -  I2C slave address
+	- vbat-supply - Required supply regulator
+
+Example:
+
+drv2667: drv2667 at 59 {
+		compatible = "ti,drv2667";
+		reg = <0x59>;
+};
+
+For more product information please see the link below:
+http://www.ti.com/product/drv2667
Signature · 1 line
1.7.9.5
author
#7 lore raw

PATCH 2/2 input: misc: Add support for the DRV2667 haptic driver

In reply to Dan Murphy

Adding support for the DRV2667 haptic driver.
This device has the ability to store vibration
patterns in RAM and execute them once the GO bit
is set.

The initial driver sets a basic waveform in the first waveform sequence and will play the waveform when the GO bit is set and will continously play the waveform until the GO bit is unset.

Data sheet is here:
http://www.ti.com/product/drv2667

---
 drivers/input/misc/Kconfig   |   11 +
 drivers/input/misc/Makefile  |    1 +
 drivers/input/misc/drv2667.c |  500 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 512 insertions(+)
 create mode 100644 drivers/input/misc/drv2667.c
drivers/input/misc/Kconfig +11 -0
index 41d0ae6..51891f6 100644
@@ -687,4 +687,15 @@ config INPUT_DRV260X_HAPTICS
 	  To compile this driver as a module, choose M here: the
 	  module will be called drv260x-haptics.
 
+config INPUT_DRV2667_HAPTICS
+	tristate "TI DRV2667 haptics support"
+	depends on INPUT && I2C
+	select INPUT_FF_MEMLESS
+	select REGMAP_I2C
+	help
+	  Say Y to enable support for the TI DRV2667 haptics driver.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called drv260x-haptics.
+
 endif
drivers/input/misc/Makefile +1 -0
index cd4bc2d..e0cee17 100644
@@ -27,6 +27,7 @@ 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_DRV2667_HAPTICS)	+= drv2667.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
drivers/input/misc/drv2667.c new file +500 -0

500 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#2 lore raw

Re: [PATCH 1/2] doc: dt/bindings: input: introduce TI DRV2667 haptic driver description

In reply to Dan Murphy

Hello.

Quoted 15 lines · Dan Murphy

DRV2667 is a haptic/vibrator driver for Linear Resonant Actuators. Adding dt binding for this part

---
  .../devicetree/bindings/input/ti,drv2667.txt       |   18 ++++++++++++++++++
  1 file changed, 18 insertions(+)

create mode 100644 Documentation/devicetree/bindings/input/ti,drv2667.txt

Documentation/devicetree/bindings/input/ti,drv2667.txt new file +0 -0
new file mode 100644
index 0000000..525216d

Documentation/devicetree/bindings/input/ti,drv2667.txt line 3

Quoted 3 lines
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +3 -0
@@ -0,0 +1,18 @@
+Texas Instruments - drv2667 Haptics driver
+
+The drv2667 uses serial control bus communicates through I2C protocols

I can't parse that.

Documentation/devicetree/bindings/input/ti,drv2667.txt line 14

Quoted 11 lines
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +11 -0
+
+Required properties:
+	- compatible - "ti,drv2667" - DRV2667
+	- reg -  I2C slave address
+	- vbat-supply - Required supply regulator
+
+Example:
+
+drv2667: drv2667 at 59 {
+		compatible = "ti,drv2667";
+		reg = <0x59>;

You say "vbat-supply" is mandatory, yet you don't have it in your example?

WBR, Sergei

#3 lore raw

Re: [PATCH 1/2] doc: dt/bindings: input: introduce TI DRV2667 haptic driver description

Sergei

Quoted 13 lines · Sergei Shtylyov

Hello.

Quoted 8 lines · Dan Murphy

DRV2667 is a haptic/vibrator driver for Linear Resonant Actuators. Adding dt binding for this part

---
  .../devicetree/bindings/input/ti,drv2667.txt       |   18 ++++++++++++++++++
  1 file changed, 18 insertions(+)

create mode 100644 Documentation/devicetree/bindings/input/ti,drv2667.txt

Quoted 12 lines

Documentation/devicetree/bindings/input/ti,drv2667.txt line 3

Quoted 9 lines
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +3 -0
new file mode 100644
index 0000000..525216d
@@ -0,0 +1,18 @@
+Texas Instruments - drv2667 Haptics driver
+
+The drv2667 uses serial control bus communicates through I2C protocols

I can't parse that.

Hmmm.. It made sense when I typed it. Will fix

Quoted 5 lines
Quoted 5 lines
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +5 -0
+
+Required properties:
+	- compatible - "ti,drv2667" - DRV2667
+	- reg -  I2C slave address
+	- vbat-supply - Required supply regulator
Quoted 8 lines

Documentation/devicetree/bindings/input/ti,drv2667.txt line 14

Quoted 6 lines
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +6 -0
+
+Example:
+
+drv2667: drv2667 at 59 {
+		compatible = "ti,drv2667";
+		reg = <0x59>;

You say "vbat-supply" is mandatory, yet you don't have it in your example?

I will add this as well.

Quoted 4 lines

WBR, Sergei

Signature · 2 lines
------------------
Dan Murphy
#4 lore raw

Re: [PATCH 1/2] doc: dt/bindings: input: introduce TI DRV2667 haptic driver description

In reply to Dan Murphy

Hello.

Quoted 17 lines · Dan Murphy

DRV2667 is a haptic/vibrator driver for Linear Resonant Actuators. Adding dt binding for this part

---
  .../devicetree/bindings/input/ti,drv2667.txt       |   18 ++++++++++++++++++
  1 file changed, 18 insertions(+)

create mode 100644 Documentation/devicetree/bindings/input/ti,drv2667.txt

Documentation/devicetree/bindings/input/ti,drv2667.txt new file +2 -0
new file mode 100644
index 0000000..525216d
@@ -0,0 +1,18 @@
+Texas Instruments - drv2667 Haptics driver
+

Documentation/devicetree/bindings/input/ti,drv2667.txt line 12

Quoted 10 lines
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +10 -0
+The drv2667 uses serial control bus communicates through I2C protocols
+
+Required properties:
+	- compatible - "ti,drv2667" - DRV2667
+	- reg -  I2C slave address
+	- vbat-supply - Required supply regulator
+
+Example:
+
+drv2667: drv2667 at 59 {

The ePAPR standard [1] has something to say on this matter:

"The name of a node should be somewhat generic, reflecting the function of the device and not its precise programming model."

Documentation/devicetree/bindings/input/ti,drv2667.txt line 13

Quoted 1 line
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +1 -0
+		compatible = "ti,drv2667";

Indented too much to the right.

Documentation/devicetree/bindings/input/ti,drv2667.txt line 14

Quoted 1 line
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +1 -0
+		reg = <0x59>;
    Still no "vbat-supply"... :-/

Documentation/devicetree/bindings/input/ti,drv2667.txt line 15

Quoted 1 line
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +1 -0
+};

[...]

WBR, Sergei

#5 lore raw

Re: [PATCH 1/2] doc: dt/bindings: input: introduce TI DRV2667 haptic driver description

Sergei
Thanks for the additional comments

Quoted 25 lines · Sergei Shtylyov

Hello.

Quoted 21 lines · Dan Murphy

DRV2667 is a haptic/vibrator driver for Linear Resonant Actuators. Adding dt binding for this part

---
  .../devicetree/bindings/input/ti,drv2667.txt       |   18 ++++++++++++++++++
  1 file changed, 18 insertions(+)

create mode 100644 Documentation/devicetree/bindings/input/ti,drv2667.txt

Documentation/devicetree/bindings/input/ti,drv2667.txt new file +6 -0
new file mode 100644
index 0000000..525216d
@@ -0,0 +1,18 @@
+Texas Instruments - drv2667 Haptics driver
+
+The drv2667 uses serial control bus communicates through I2C protocols
+
+Required properties:
+	- compatible - "ti,drv2667" - DRV2667
Quoted 8 lines

Documentation/devicetree/bindings/input/ti,drv2667.txt line 12

Quoted 6 lines
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +6 -0
+	- reg -  I2C slave address
+	- vbat-supply - Required supply regulator
+
+Example:
+
+drv2667: drv2667 at 59 {

The ePAPR standard [1] has something to say on this matter:

What is this reference? Did not know this existed so wanted to read up on it.

I can change it to haptics or vibrator

Quoted 7 lines

"The name of a node should be somewhat generic, reflecting the function of the device and not its precise programming model."

Documentation/devicetree/bindings/input/ti,drv2667.txt line 13

Quoted 1 line
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +1 -0
+		compatible = "ti,drv2667";

Indented too much to the right.

One tab to many. Got it

Quoted 5 lines

Documentation/devicetree/bindings/input/ti,drv2667.txt line 14

Quoted 2 lines
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +1 -0
+		reg = <0x59>;
    Still no "vbat-supply"... :-/

Still have not sent in v2 of the patch yet. Waiting on other comments.

Quoted 6 lines

Documentation/devicetree/bindings/input/ti,drv2667.txt line 15

Quoted 1 line
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +1 -0
+};

[...]

WBR, Sergei

Signature · 2 lines
------------------
Dan Murphy
#6 lore raw

Re: [PATCH 1/2] doc: dt/bindings: input: introduce TI DRV2667 haptic driver description

On 08/21/2014 11:14 PM, Murphy, Dan wrote:

[...]

Quoted 30 lines
Quoted 21 lines
Quoted 21 lines

DRV2667 is a haptic/vibrator driver for Linear Resonant Actuators. Adding dt binding for this part

---
   .../devicetree/bindings/input/ti,drv2667.txt       |   18 ++++++++++++++++++
   1 file changed, 18 insertions(+)

create mode 100644 Documentation/devicetree/bindings/input/ti,drv2667.txt

Documentation/devicetree/bindings/input/ti,drv2667.txt new file +6 -0
new file mode 100644
index 0000000..525216d
@@ -0,0 +1,18 @@
+Texas Instruments - drv2667 Haptics driver
+
+The drv2667 uses serial control bus communicates through I2C protocols
+
+Required properties:
+	- compatible - "ti,drv2667" - DRV2667
Quoted 8 lines

Documentation/devicetree/bindings/input/ti,drv2667.txt line 12

Quoted 6 lines
Documentation/devicetree/bindings/input/ti,drv2667.txt new file +6 -0
+	- reg -  I2C slave address
+	- vbat-supply - Required supply regulator
+
+Example:
+
+drv2667: drv2667 at 59 {

The ePAPR standard [1] has something to say on this matter:

Quoted 1 line

What is this reference? Did not know this existed so wanted to read up on it.

Sorry, forgot to paste the link. :-<

[1] http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf

WBR, Sergei