linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Alexandre Courbot <gnurou@gmail.com>
Subject: Re: [PATCH RESEND] gpio: Add support for GPIOF_ACTIVE_LOW to gpio_request_one functions
Date: Wed, 23 Jul 2014 17:32:42 +0200	[thread overview]
Message-ID: <CACRpkdbn+nNJ4L71ZkLzNWWvmAq=bTYTBg1AJWe7TAtGq+3pKw@mail.gmail.com> (raw)
In-Reply-To: <1405966336-6605-1-git-send-email-linux@roeck-us.net>

On Mon, Jul 21, 2014 at 8:12 PM, Guenter Roeck <linux@roeck-us.net> wrote:

> The gpio include file and the gpio documentation declare and document
> GPIOF_ACTIVE_LOW as one of the flags to be passed to gpio_request_one
> and related functions. However, the flag is not evaluated or used.
>
> This can cause problems in at least two areas: First, the same API can
> be used to auto-export pins to user space. The missing support for
> GPIOF_ACTIVE_LOW results in unexpected behavior for such auto-exported
> pins. Second, the requested gpio pin can be convered for use by
> gpiod functions with gpio_to_desc(). While gpio API functions do not
> support GPIOF_ACTIVE_LOW, gpiod functions do, which again results in
> unexpected behavior.
>
> Check the flag in gpio_request_one and set the gpio internal flag
> FLAG_ACTIVE_LOW if it is set to address those problems.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>

Patch applied after manually rebasing so it hits gpiolib-legacy.c.

Yours,
Linus Walleij

      reply	other threads:[~2014-07-23 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 18:12 [PATCH RESEND] gpio: Add support for GPIOF_ACTIVE_LOW to gpio_request_one functions Guenter Roeck
2014-07-23 15:32 ` Linus Walleij [this message]

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='CACRpkdbn+nNJ4L71ZkLzNWWvmAq=bTYTBg1AJWe7TAtGq+3pKw@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=gnurou@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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).