netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Devarsh Thakkar <devarsht@ti.com>,
	Stefan Schmidt <stefan@datenfreihafen.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-doc-tw-discuss@lists.sourceforge.net,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org,
	linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org,
	linux-sh@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-input@vger.kernel.org, linux-media@vger.kernel.org,
	linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
	linux-wireless@vger.kernel.org,
	brcm80211-dev-list.pdl@broadcom.com,
	SHA-cyfmac-dev-list@infineon.com, linux-arch@vger.kernel.org,
	devicetree@vger.kernel.org, Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH v3 04/12] gpiolib: remove gpio_set_debounce
Date: Wed, 8 Feb 2023 00:56:14 +0200	[thread overview]
Message-ID: <Y+LXDvl4lpfF4SnK@smile.fi.intel.com> (raw)
In-Reply-To: <Y+LDUTfKgHEJHNXB@google.com>

On Tue, Feb 07, 2023 at 01:32:01PM -0800, Dmitry Torokhov wrote:
> On Tue, Feb 07, 2023 at 04:29:44PM +0200, Andy Shevchenko wrote:
> > @@ -1010,14 +1009,21 @@ static int ads7846_setup_pendown(struct spi_device *spi,
> >  		}
> >  
> >  		ts->gpio_pendown = pdata->gpio_pendown;
> > -
> > -		if (pdata->gpio_pendown_debounce)
> > -			gpio_set_debounce(pdata->gpio_pendown,
> > -					  pdata->gpio_pendown_debounce);
> 
> Can we please change only this to:
> 
> 			gpiod_set_debounce(gpio_to_desc(pdata->gpio_pendown),
> 					   pdata->gpio_pendown_debounce);
> 
> and not change anything else (i.e. drop the changes below)?

Probably. I can try rollback this.

> >  	} else {
> > -		dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n");
> > -		return -EINVAL;
> > +		struct gpio_desc *desc;
> > +
> > +		desc = devm_gpiod_get(&spi->dev, "pendown", GPIOD_IN);
> > +		if (IS_ERR(desc)) {
> > +			dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n");
> > +			return PTR_ERR(desc);
> > +		}
> > +		gpiod_set_consumer_name(desc, "ads7846_pendown");
> > +
> > +		ts->gpio_pendown = desc_to_gpio(desc);
> >  	}
> > +	if (pdata->gpio_pendown_debounce)
> > +		gpiod_set_debounce(gpio_to_desc(ts->gpio_pendown),
> > +				   pdata->gpio_pendown_debounce);
> >  
> >  	return 0;

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-02-07 22:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 14:29 [PATCH v3 00/12] gpiolib cleanups Andy Shevchenko
2023-02-07 14:29 ` [PATCH v3 01/12] gpiolib: remove empty asm/gpio.h files Andy Shevchenko
2023-02-07 20:53   ` Vincenzo Palazzo
2023-02-07 14:29 ` [PATCH v3 02/12] gpiolib: coldfire: remove custom asm/gpio.h Andy Shevchenko
2023-02-07 14:29 ` [PATCH v3 03/12] gpiolib: remove asm-generic/gpio.h Andy Shevchenko
2023-02-07 14:29 ` [PATCH v3 04/12] gpiolib: remove gpio_set_debounce Andy Shevchenko
2023-02-07 21:32   ` Dmitry Torokhov
2023-02-07 22:56     ` Andy Shevchenko [this message]
2023-02-07 14:29 ` [PATCH v3 05/12] gpiolib: remove legacy gpio_export Andy Shevchenko
2023-02-07 14:29 ` [PATCH v3 06/12] gpiolib: split linux/gpio/driver.h out of linux/gpio.h Andy Shevchenko
2023-02-07 14:55   ` Linus Walleij
2023-02-07 22:55     ` Andy Shevchenko
2023-02-08 14:51       ` Andy Shevchenko
2023-02-08 14:55         ` Linus Walleij
2023-02-07 18:43   ` Lee Jones
2023-02-07 14:29 ` [PATCH v3 07/12] gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h Andy Shevchenko
2023-02-07 14:29 ` [PATCH v3 08/12] gpio: aggregator: Add missing header(s) Andy Shevchenko
2023-02-08 10:08   ` Geert Uytterhoeven
2023-02-07 14:29 ` [PATCH v3 09/12] gpiolib: Drop unused forward declaration from driver.h Andy Shevchenko
2023-02-07 14:29 ` [PATCH v3 10/12] gpiolib: Deduplicate forward declarations in consumer.h Andy Shevchenko
2023-02-07 14:29 ` [PATCH v3 11/12] gpiolib: Group " Andy Shevchenko
2023-02-07 14:29 ` [PATCH v3 12/12] gpiolib: Clean up headers Andy Shevchenko

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=Y+LXDvl4lpfF4SnK@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=SHA-cyfmac-dev-list@infineon.com \
    --cc=arnd@arndb.de \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brgl@bgdev.pl \
    --cc=christophe.leroy@csgroup.eu \
    --cc=devarsht@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc-tw-discuss@lists.sourceforge.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=stefan@datenfreihafen.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 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).