linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>, linux-gpio@vger.kernel.org
Subject: Re: [PATCH v2 08/13] pinctrl: intel: Introduce for_each_requested_gpio() macro
Date: Mon, 15 Jun 2020 15:01:48 +0300	[thread overview]
Message-ID: <20200615120148.GA2428291@smile.fi.intel.com> (raw)
In-Reply-To: <20200615115927.GG247495@lahna.fi.intel.com>

On Mon, Jun 15, 2020 at 02:59:27PM +0300, Mika Westerberg wrote:
> On Fri, Jun 12, 2020 at 05:50:01PM +0300, Andy Shevchenko wrote:
> > Introduce for_each_requested_gpio() macro which helps to iterate
> > over requested GPIO in a range.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  drivers/pinctrl/intel/pinctrl-intel.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/pinctrl/intel/pinctrl-intel.h b/drivers/pinctrl/intel/pinctrl-intel.h
> > index 4e17308d33e9..c1f312bc28eb 100644
> > --- a/drivers/pinctrl/intel/pinctrl-intel.h
> > +++ b/drivers/pinctrl/intel/pinctrl-intel.h
> > @@ -249,4 +249,8 @@ const struct dev_pm_ops _name = {					\
> >  				      intel_pinctrl_resume_noirq)	\
> >  }
> >  
> 
> kernel-doc would be good to have here.

Okay, actually I considered to have this in the gpio/driver.h or so.

> > +#define for_each_requested_gpio(chip, i, base, size)			\
> > +	for (i = 0; i < size; i++)					\
> > +		if (!gpiochip_is_requested(chip, base + i)) {} else
> > +
> >  #endif /* PINCTRL_INTEL_H */

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2020-06-15 12:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 14:49 [PATCH v2 01/13] pinctrl: intel: Disable input and output buffer when switching to GPIO Andy Shevchenko
2020-06-12 14:49 ` [PATCH v2 02/13] pinctrl: intel: Reduce scope of the lock Andy Shevchenko
2020-06-12 14:49 ` [PATCH v2 03/13] pinctrl: intel: Make use of IRQ_RETVAL() Andy Shevchenko
2020-06-12 14:49 ` [PATCH v2 04/13] pinctrl: intel: Get rid of redundant 'else' in intel_config_set_debounce() Andy Shevchenko
2020-06-12 14:49 ` [PATCH v2 05/13] pinctrl: intel: Drop the only label in the code for consistency Andy Shevchenko
2020-06-12 14:49 ` [PATCH v2 06/13] pinctrl: intel: Split intel_config_get() to three functions Andy Shevchenko
2020-06-12 14:50 ` [PATCH v2 07/13] pinctrl: intel: Protect IO in few call backs by lock Andy Shevchenko
2020-06-12 14:50 ` [PATCH v2 08/13] pinctrl: intel: Introduce for_each_requested_gpio() macro Andy Shevchenko
2020-06-15 11:59   ` Mika Westerberg
2020-06-15 12:01     ` Andy Shevchenko [this message]
2020-06-20 20:56       ` Linus Walleij
2020-06-12 14:50 ` [PATCH v2 09/13] pinctrl: intel: Make use of for_each_requested_gpio() Andy Shevchenko
2020-06-12 14:50 ` [PATCH v2 10/13] pinctrl: lynxpoint: " Andy Shevchenko
2020-06-12 14:50 ` [PATCH v2 11/13] pinctrl: lynxpoint: Introduce helpers to enable or disable input Andy Shevchenko
2020-06-12 14:50 ` [PATCH v2 12/13] pinctrl: lynxpoint: Drop no-op ACPI_PTR() call Andy Shevchenko
2020-06-12 14:50 ` [PATCH v2 13/13] pinctrl: baytrail: " Andy Shevchenko
2020-06-15 12:01 ` [PATCH v2 01/13] pinctrl: intel: Disable input and output buffer when switching to GPIO Mika Westerberg
2020-06-15 13:04   ` 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=20200615120148.GA2428291@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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).