Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1185145

Re: [PATCH 4/4] Input: tsc2005 - convert to gpiod

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] Input: tsc2005 - convert to gpiod
Date 2015-07-16 02:30 +0200
Message-ID <pMFdM-781-11@gated-at.bofh.it> (permalink)
References <pMtPj-7dE-11@gated-at.bofh.it> <pMtPk-7dE-25@gated-at.bofh.it> <pMCzh-3gV-15@gated-at.bofh.it> <pMD2i-45a-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 16, 2015 at 12:09:41AM +0200, Sebastian Reichel wrote:
> Hi,
> 
> On Wed, Jul 15, 2015 at 02:34:04PM -0700, Dmitry Torokhov wrote:
> > [...]
> > >  	if (np) {
> > > -		ts->reset_gpio = of_get_named_gpio(np, "reset-gpios", 0);
> > > -		if (ts->reset_gpio == -EPROBE_DEFER)
> > > -			return ts->reset_gpio;
> > > -		if (ts->reset_gpio < 0) {
> > > +		ts->reset_gpio = devm_gpiod_get(&spi->dev, "reset",
> > > +						GPIOD_OUT_HIGH);
> > 
> > I think we should treat the gpio as optional and try to get the
> > descriptor event on non-OF boards.
> 
> As I wrote in the cover letter, I suggest to change this once the
> Nokia N900 board code has been removed. At that point changing the
> board code API is much easier, since it won't affect multiple trees.

I do not see why it has be wait for Nokia board code. Just make it
devm_gpiod_get_optional() and call it unconditionally and fall back onto
custom reset function (if one is supplied).

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] [input] tsc2005 cleanup Sebastian Reichel <sre@kernel.org> - 2015-07-15 14:20 +0200
  [PATCH 1/4] Input: tsc2005 - improve readability of register defines Sebastian Reichel <sre@kernel.org> - 2015-07-15 14:20 +0200
  [PATCH 4/4] Input: tsc2005 - convert to gpiod Sebastian Reichel <sre@kernel.org> - 2015-07-15 14:20 +0200
    Re: [PATCH 4/4] Input: tsc2005 - convert to gpiod Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-07-15 23:40 +0200
      Re: [PATCH 4/4] Input: tsc2005 - convert to gpiod Sebastian Reichel <sre@kernel.org> - 2015-07-16 00:10 +0200
        Re: [PATCH 4/4] Input: tsc2005 - convert to gpiod Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-07-16 02:30 +0200
  [PATCH 2/4] Input: tsc2005 - convert to regmap Sebastian Reichel <sre@kernel.org> - 2015-07-15 14:20 +0200
    Re: [PATCH 2/4] Input: tsc2005 - convert to regmap Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-07-15 23:40 +0200
      Re: [PATCH 2/4] Input: tsc2005 - convert to regmap Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-07-15 23:50 +0200
      Re: [PATCH 2/4] Input: tsc2005 - convert to regmap Sebastian Reichel <sre@kernel.org> - 2015-07-16 00:00 +0200
  [PATCH 3/4] Input: tsc2005 - simplify drvdata acquisition Sebastian Reichel <sre@kernel.org> - 2015-07-15 14:20 +0200
    Re: [PATCH 3/4] Input: tsc2005 - simplify drvdata acquisition Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-07-15 23:40 +0200
      Re: [PATCH 3/4] Input: tsc2005 - simplify drvdata acquisition Sebastian Reichel <sre@kernel.org> - 2015-07-16 00:10 +0200
        Re: [PATCH 3/4] Input: tsc2005 - simplify drvdata acquisition Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-07-16 02:30 +0200

csiph-web