[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdau6dE1mjBx6rew1Ad8FHu7cTMfwNN1rsrWXvPcUeAR2g@mail.gmail.com>
Date: Wed, 12 Feb 2014 17:14:50 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Alexandre Courbot <acourbot@...dia.com>
Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>,
Jean-Jacques Hiblot <jjhiblot@...phandler.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] gpiolib: add gpiochip_get_desc() driver function
On Sun, Feb 9, 2014 at 9:43 AM, Alexandre Courbot <acourbot@...dia.com> 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@...dia.com>
Hm the gpio_lock_as_irq() uses a local offset number on
the GPIOchip, not the global GPIO number, so I'm not
quite following the first paragraph here.
But this is useful anyway so patch applied.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists