All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Jean-Jacques Hiblot <jjhiblot@traphandler.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] gpiolib: add gpiochip_get_desc() driver function
Date: Mon, 10 Feb 2014 12:05:44 +0200	[thread overview]
Message-ID: <20140210100544.GU18029@intel.com> (raw)
In-Reply-To: <1391935435-29002-1-git-send-email-acourbot@nvidia.com>

On Sun, Feb 09, 2014 at 05:43:54PM +0900, Alexandre Courbot wrote:
> Some drivers dealing with a gpio_chip might need to act on its
> descriptors directly; one example is pinctrl drivers that need to lock a
> GPIO for being used as IRQ using gpiod_lock_as_irq().
> 
> This patch exports a gpiochip_get_desc() function that returns the
> GPIO descriptor at the requested index. It also sweeps the
> gpio_to_chip() function out of the consumer interface since any holder
> of a gpio_chip reference can manipulate its GPIOs way beyond what a
> consumer should be allowed to do.
> 
> As a result, gpio_chip is not visible anymore to simple GPIO consumers.
> 
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
> Jean-Jacques, I think you will want to use this function for locking GPIOs
> in the AT91 pinctrl driver. Mika, we talked about this a while ago already,
> but here it is finally. Next patch uses it in the GPIO ACPI driver.

This seems to be useful for ACPI GPIO operation region implementation as
well.

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

  parent reply	other threads:[~2014-02-10  9:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-09  8:43 [PATCH 1/2] gpiolib: add gpiochip_get_desc() driver function Alexandre Courbot
2014-02-09  8:43 ` [PATCH 2/2] gpiolib: ACPI: remove gpio_to_desc() usage Alexandre Courbot
2014-02-10 10:06   ` Mika Westerberg
2014-02-12 16:16   ` Linus Walleij
2014-02-10 10:05 ` Mika Westerberg [this message]
2014-02-12  9:41 ` [PATCH 1/2] gpiolib: add gpiochip_get_desc() driver function Jean-Jacques Hiblot
2014-02-12 16:14 ` Linus Walleij

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=20140210100544.GU18029@intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=acourbot@nvidia.com \
    --cc=jjhiblot@traphandler.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.