linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Murphy, Dan" <dmurphy@ti.com>
Cc: "mark.rutland@arm.com" <mark.rutland@arm.com>,
	"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>
Subject: Re: [PATCH v6] input: drv260x: Add TI drv260x haptics driver
Date: Tue, 19 Aug 2014 13:24:38 -0700	[thread overview]
Message-ID: <20140819202438.GD3626@core.coreip.homeip.net> (raw)
In-Reply-To: <00FC9A978A94B7418C33AFAE8A35ED49DEC3E6@DFLE09.ent.ti.com>

On Tue, Aug 19, 2014 at 08:13:32PM +0000, Murphy, Dan wrote:
> On 08/19/2014 03:07 PM, Dmitry Torokhov wrote:
> > On Tue, Aug 19, 2014 at 07:35:06PM +0000, Murphy, Dan wrote:
> >> Dmitry
> >>
> >> On 08/19/2014 02:24 PM, Dmitry Torokhov wrote:
> >>> Hi Dan,
> >>>
> >>> On Fri, Aug 15, 2014 at 10:47:50AM -0500, Dan Murphy wrote:
> >>>> diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
> >>>> index 2ff4425..99f6762 100644
> >>>> --- a/drivers/input/misc/Kconfig
> >>>> +++ b/drivers/input/misc/Kconfig
> >>>> @@ -676,4 +676,13 @@ 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
> >>>
> >>> This also needs "select REGMAP_I2C"
> >>>
> >>
> >> This one is OK
> >>
> >>>> +	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.
> >>>> +
> >>>
> >>> [...]
> >>>
> >>>> +#ifndef _LINUX_DRV260X_PDATA_H
> >>>> +#define _LINUX_DRV260X_PDATA_H
> >>>> +
> >>>> +struct drv260x_platform_data {
> >>>> +	int enable_gpio;
> >>>
> >>> I do not see this used anywhere.
> >>
> >> But this is actually used here
> >>
> >> haptics->enable_gpio = devm_gpiod_get(&client->dev, "enable");
> >>
> >> for the non-dt case
> > 
> > "haptics" is not instance of drv260x_platform_data but drv260x_data which
> > defines:
> > 
> > struct drv260x_data {
> > 	...
> > 	struct gpio_desc *enable_gpio;
> > 	...
> > 
> > That one I kept.
> > 
> 
> Yes that is correct but the enable_gpio for non-dt enabled devices this enable_gpio
> needs to come from the platform data structure.  Without the enable gpio in the platform data
> structure there is no way for non-dt enabled devices to set the gpio value.

What else uses the platform data structure? You are accessing gpio by name, not
by number, in the driver so I am not sure how non-dt case will use u32 defined
in platform data.

> 
> The haptics instance just stores the gpio descriptor returned from this call.

Right.

> 
> The devm_gpiod looks at the platform data is CONFIG_OF is not set.

Umm, how? You do not pass it anywhere...

Thanks.

-- 
Dmitry

  reply	other threads:[~2014-08-19 20:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 15:47 [PATCH v6] input: drv260x: Add TI drv260x haptics driver Dan Murphy
     [not found] ` <1408117670-19750-1-git-send-email-dmurphy-l0cyMroinI0@public.gmane.org>
2014-08-19 19:24   ` Dmitry Torokhov
2014-08-19 19:35     ` Murphy, Dan
2014-08-19 20:07       ` Dmitry Torokhov
2014-08-19 20:13         ` Murphy, Dan
2014-08-19 20:24           ` Dmitry Torokhov [this message]
2014-08-19 20:55             ` Murphy, Dan

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=20140819202438.GD3626@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).