All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: "Murphy, Dan" <dmurphy-l0cyMroinI0@public.gmane.org>
Cc: "linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [v2] input: drv260x: Add TI drv260x haptics driver
Date: Tue, 29 Jul 2014 15:39:36 +0100	[thread overview]
Message-ID: <20140729143936.GS2576@leverpostej> (raw)
In-Reply-To: <00FC9A978A94B7418C33AFAE8A35ED49DB2AAD-l8PMxShYob2IQmiDNMet8wC/G2K4zDHf@public.gmane.org>

On Tue, Jul 29, 2014 at 02:50:48PM +0100, Murphy, Dan wrote:
> Mark
> 
> Thanks for the feedback
> 
> On 07/29/2014 04:37 AM, Mark Rutland wrote:
> > On Mon, Jul 28, 2014 at 05:53:23PM +0100, Dan Murphy wrote:
> >> 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 <dmurphy-l0cyMroinI0@public.gmane.org>
> >> ---
> >>
> >> v2 - Fixed binding doc and patch headline - https://patchwork.kernel.org/patch/4619641/
> >>
> >>  .../devicetree/bindings/input/ti,drv260x.txt       |   44 ++
> >>  drivers/input/misc/Kconfig                         |    9 +
> >>  drivers/input/misc/Makefile                        |    1 +
> >>  drivers/input/misc/drv260x.c                       |  537 ++++++++++++++++++++
> >>  include/dt-bindings/input/ti-drv260x.h             |   30 ++
> >>  include/linux/input/drv260x.h                      |  181 +++++++
> >>  6 files changed, 802 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/input/ti,drv260x.txt
> >>  create mode 100644 drivers/input/misc/drv260x.c
> >>  create mode 100644 include/dt-bindings/input/ti-drv260x.h
> >>  create mode 100644 include/linux/input/drv260x.h
> >>
> >> diff --git a/Documentation/devicetree/bindings/input/ti,drv260x.txt b/Documentation/devicetree/bindings/input/ti,drv260x.txt
> >> new file mode 100644
> >> index 0000000..930429b
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/input/ti,drv260x.txt
> >> @@ -0,0 +1,44 @@
> >> +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
> >> +       - mode - Power up mode of the chip (defined in include/dt-bindings/input/ti-drv260x.h)
> >> +               DRV260X_RTP_MODE - Real time playback mode
> >> +               DRV260X_LRA_MODE - Linear Resonance Actuator mode (Piezoelectric)
> >> +               DRV260X_ERM_MODE - Eccentric Rotating Mass mode (Rotary vibrator)
> > 
> > What exactly are these, and why does the kernel not decide?
> 
> The LRA and ERM are vibrator types.  These are specific to the product and the kernel cannot decide.
> The kernel driver needs to be told what type of vibrator is connected.  The driver then
> sets the voltages and other settings to drive the vibrator type safely. All vibrators are dumb and do not
> have IDs identifying themselves so there is no self discovery here.

I see. That makes sense, thanks for the description.

It might make more sense to call this "vibrator-type", rather than
"mode", but otherwise this should be ok.

In the past I've asked for strings rather than magic numbers, but I'll
leave that choice to you.

> RTP is not a vibrator type but just a mode you can place the device into.  I can probably remove that
> and have the user space or driver take care of that setting.

Ok, that sounds good to me.

> 
> > 
> >> +       - library_sel - Library to use at power up (defined in include/dt-bindings/input/ti-drv260x.h)
> > 
> > Please s/_/-/ in all property names.
> > 
> >> +               DRV260X_LIB_A - Pre-programmed Library
> >> +               DRV260X_LIB_B - Pre-programmed Library
> >> +               DRV260X_LIB_C - Pre-programmed Library
> >> +               DRV260X_LIB_D - Pre-programmed Library
> >> +               DRV260X_LIB_E - Pre-programmed Library
> >> +               DRV260X_LIB_F - Pre-programmed Library
> > 
> > What exactly are these, and why does the kernel not decide?
> > 
> >> +
> >> +Optional properties:
> >> +       - enable-gpio - gpio pin to enable/disable the device.
> >> +       - vib_rated_voltage - The rated voltage of the actuator.  If this is not
> >> +                                                 set then the value will be defaulted to 0x90 in the
> >> +                                                 driver.
> > 
> > What units is this in?
> 
> Good catch I was thinking this when I was writing the documentation but forgot to add
> it.  I will fix the formatting here and below as well.

Cheers.

Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: "Murphy, Dan" <dmurphy@ti.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>
Subject: Re: [v2] input: drv260x: Add TI drv260x haptics driver
Date: Tue, 29 Jul 2014 15:39:36 +0100	[thread overview]
Message-ID: <20140729143936.GS2576@leverpostej> (raw)
In-Reply-To: <00FC9A978A94B7418C33AFAE8A35ED49DB2AAD@DFLE09.ent.ti.com>

On Tue, Jul 29, 2014 at 02:50:48PM +0100, Murphy, Dan wrote:
> Mark
> 
> Thanks for the feedback
> 
> On 07/29/2014 04:37 AM, Mark Rutland wrote:
> > On Mon, Jul 28, 2014 at 05:53:23PM +0100, Dan Murphy wrote:
> >> 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 <dmurphy@ti.com>
> >> ---
> >>
> >> v2 - Fixed binding doc and patch headline - https://patchwork.kernel.org/patch/4619641/
> >>
> >>  .../devicetree/bindings/input/ti,drv260x.txt       |   44 ++
> >>  drivers/input/misc/Kconfig                         |    9 +
> >>  drivers/input/misc/Makefile                        |    1 +
> >>  drivers/input/misc/drv260x.c                       |  537 ++++++++++++++++++++
> >>  include/dt-bindings/input/ti-drv260x.h             |   30 ++
> >>  include/linux/input/drv260x.h                      |  181 +++++++
> >>  6 files changed, 802 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/input/ti,drv260x.txt
> >>  create mode 100644 drivers/input/misc/drv260x.c
> >>  create mode 100644 include/dt-bindings/input/ti-drv260x.h
> >>  create mode 100644 include/linux/input/drv260x.h
> >>
> >> diff --git a/Documentation/devicetree/bindings/input/ti,drv260x.txt b/Documentation/devicetree/bindings/input/ti,drv260x.txt
> >> new file mode 100644
> >> index 0000000..930429b
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/input/ti,drv260x.txt
> >> @@ -0,0 +1,44 @@
> >> +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
> >> +       - mode - Power up mode of the chip (defined in include/dt-bindings/input/ti-drv260x.h)
> >> +               DRV260X_RTP_MODE - Real time playback mode
> >> +               DRV260X_LRA_MODE - Linear Resonance Actuator mode (Piezoelectric)
> >> +               DRV260X_ERM_MODE - Eccentric Rotating Mass mode (Rotary vibrator)
> > 
> > What exactly are these, and why does the kernel not decide?
> 
> The LRA and ERM are vibrator types.  These are specific to the product and the kernel cannot decide.
> The kernel driver needs to be told what type of vibrator is connected.  The driver then
> sets the voltages and other settings to drive the vibrator type safely. All vibrators are dumb and do not
> have IDs identifying themselves so there is no self discovery here.

I see. That makes sense, thanks for the description.

It might make more sense to call this "vibrator-type", rather than
"mode", but otherwise this should be ok.

In the past I've asked for strings rather than magic numbers, but I'll
leave that choice to you.

> RTP is not a vibrator type but just a mode you can place the device into.  I can probably remove that
> and have the user space or driver take care of that setting.

Ok, that sounds good to me.

> 
> > 
> >> +       - library_sel - Library to use at power up (defined in include/dt-bindings/input/ti-drv260x.h)
> > 
> > Please s/_/-/ in all property names.
> > 
> >> +               DRV260X_LIB_A - Pre-programmed Library
> >> +               DRV260X_LIB_B - Pre-programmed Library
> >> +               DRV260X_LIB_C - Pre-programmed Library
> >> +               DRV260X_LIB_D - Pre-programmed Library
> >> +               DRV260X_LIB_E - Pre-programmed Library
> >> +               DRV260X_LIB_F - Pre-programmed Library
> > 
> > What exactly are these, and why does the kernel not decide?
> > 
> >> +
> >> +Optional properties:
> >> +       - enable-gpio - gpio pin to enable/disable the device.
> >> +       - vib_rated_voltage - The rated voltage of the actuator.  If this is not
> >> +                                                 set then the value will be defaulted to 0x90 in the
> >> +                                                 driver.
> > 
> > What units is this in?
> 
> Good catch I was thinking this when I was writing the documentation but forgot to add
> it.  I will fix the formatting here and below as well.

Cheers.

Mark.

  parent reply	other threads:[~2014-07-29 14:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 16:53 [v2] input: drv260x: Add TI drv260x haptics driver Dan Murphy
2014-07-28 16:53 ` Dan Murphy
     [not found] ` <1406566403-1436-1-git-send-email-dmurphy-l0cyMroinI0@public.gmane.org>
2014-07-28 17:43   ` Dmitry Torokhov
2014-07-28 17:43     ` Dmitry Torokhov
2014-07-28 17:59     ` simon
2014-07-28 21:21       ` Murphy, Dan
2014-07-29 12:08         ` Michal Malý
2014-07-29 13:41           ` Murphy, Dan
2014-07-29 13:41             ` Murphy, Dan
2014-07-28 18:02     ` Murphy, Dan
2014-07-29  9:37 ` Mark Rutland
2014-07-29 13:50   ` Murphy, Dan
     [not found]     ` <00FC9A978A94B7418C33AFAE8A35ED49DB2AAD-l8PMxShYob2IQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2014-07-29 14:39       ` Mark Rutland [this message]
2014-07-29 14:39         ` Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140729143936.GS2576@leverpostej \
    --to=mark.rutland-5wv7dgnigg8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dmurphy-l0cyMroinI0@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.