The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Denis Kuzmenko <linux@solonet.org.ua>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH] gpio: add flags to export GPIOs when requesting
Date: Wed, 16 Nov 2011 01:05:25 +0200	[thread overview]
Message-ID: <4EC2F035.3060705@solonet.org.ua> (raw)
In-Reply-To: <1321397074-6526-1-git-send-email-w.sang@pengutronix.de>

Hi Wolfram,
On 11/16/2011 12:44 AM, Wolfram Sang wrote:
> Introduce new flags to automatically export GPIOs when using the convenience
> functions gpio_request_one() or gpio_request_array(). This eases support for
> custom boards where lots of GPIOs need to be exported for customer
> applications.

Adding GPIO maintainer Grant Likely to CC.

> +#define GPIOF_EXPORT		(1 << 2)
> +#define GPIOF_EXPORT_CHANGEABLE	(1 << 3)
> +#define GPIOF_EXPORT_DIR_FIXED	(GPIOF_EXPORT)
> +#define GPIOF_EXPORT_DIR_CHANGEABLE (GPIOF_EXPORT | GPIOF_EXPORT_CHANGEABLE)

Maybe, it's better to write like this:

#define GPIOF_EXPORT			(1 << 2)
#define GPIOF_EXPORT_DIR_CHANGEABLE	(3 << 2)

So you don't need additional defines (GPIOF_EXPORT_DIR_FIXED and
GPIOF_EXPORT_DIR_CHANGEABLE). This will not brake your logic and improve
readability IMHO.

-- 
Best regards, Denis Kuzmenko.

  reply	other threads:[~2011-11-15 23:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15 22:44 [PATCH] gpio: add flags to export GPIOs when requesting Wolfram Sang
2011-11-15 23:05 ` Denis Kuzmenko [this message]
2011-11-15 23:32   ` Stephen Warren
2011-11-16  8:19     ` Denis Kuzmenko
2011-11-16  9:10       ` Wolfram Sang
2011-11-16 15:57         ` Stephen Warren
2011-11-17  9:10         ` Linus Walleij
2011-11-17  9:31           ` Wolfram Sang

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=4EC2F035.3060705@solonet.org.ua \
    --to=linux@solonet.org.ua \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=w.sang@pengutronix.de \
    /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