Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2015-01-12 Thread Mark Brown
On Mon, Jan 12, 2015 at 10:40:04AM +0100, Linus Walleij wrote: > On Tue, Dec 2, 2014 at 5:12 PM, Maxime Ripard > > We do have one board where we have a pin (let's say GPIO14 of the bank > > A) that enables a regulator that will provide VCC the bank B. > I think it's a hog in this case though, not

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2015-01-12 Thread Linus Walleij
On Tue, Dec 2, 2014 at 5:12 PM, Maxime Ripard wrote: > On Tue, Dec 02, 2014 at 03:29:46PM +0100, Linus Walleij wrote: >> On Tue, Dec 2, 2014 at 3:13 PM, Alexandre Courbot wrote: >> > On Tue, Dec 2, 2014 at 1:36 AM, Maxime Ripard >> > wrote: >> >> >> The only thing I'd like to have would be that

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-08 Thread Maxime Ripard
On Sat, Dec 06, 2014 at 09:08:36PM +0900, Alexandre Courbot wrote: > On Fri, Dec 5, 2014 at 7:24 PM, Maxime Ripard > wrote: > > On Thu, Dec 04, 2014 at 11:49:19PM +0900, Alexandre Courbot wrote: > >> On Thu, Dec 4, 2014 at 11:27 PM, Maxime Ripard > >> wrote: > >> > Hi, > >> > > >> > On Thu, Dec 0

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-06 Thread Alexandre Courbot
On Fri, Dec 5, 2014 at 7:24 PM, Maxime Ripard wrote: > On Thu, Dec 04, 2014 at 11:49:19PM +0900, Alexandre Courbot wrote: >> On Thu, Dec 4, 2014 at 11:27 PM, Maxime Ripard >> wrote: >> > Hi, >> > >> > On Thu, Dec 04, 2014 at 11:15:38PM +0900, Alexandre Courbot wrote: >> >> On Wed, Dec 3, 2014 at

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-06 Thread Alexandre Courbot
On Fri, Dec 5, 2014 at 12:22 AM, Pantelis Antoniou wrote: > Hi Alexandre, > >> On Dec 4, 2014, at 17:10 , Alexandre Courbot wrote: >> >> On Fri, Dec 5, 2014 at 12:02 AM, Pantelis Antoniou >> wrote: >>> Hi Alexandre, >>> On Dec 4, 2014, at 16:58 , Alexandre Courbot wrote: On Thu,

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-05 Thread Maxime Ripard
On Thu, Dec 04, 2014 at 11:49:19PM +0900, Alexandre Courbot wrote: > On Thu, Dec 4, 2014 at 11:27 PM, Maxime Ripard > wrote: > > Hi, > > > > On Thu, Dec 04, 2014 at 11:15:38PM +0900, Alexandre Courbot wrote: > >> On Wed, Dec 3, 2014 at 1:12 AM, Maxime Ripard > >> wrote: > >> > On Tue, Dec 02, 201

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Pantelis Antoniou
Hi Alexandre, > On Dec 4, 2014, at 17:10 , Alexandre Courbot wrote: > > On Fri, Dec 5, 2014 at 12:02 AM, Pantelis Antoniou > wrote: >> Hi Alexandre, >> >>> On Dec 4, 2014, at 16:58 , Alexandre Courbot wrote: >>> >>> On Thu, Dec 4, 2014 at 11:47 PM, Pantelis Antoniou >>> wrote: Hi Alexa

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Alexandre Courbot
On Fri, Dec 5, 2014 at 12:02 AM, Pantelis Antoniou wrote: > Hi Alexandre, > >> On Dec 4, 2014, at 16:58 , Alexandre Courbot wrote: >> >> On Thu, Dec 4, 2014 at 11:47 PM, Pantelis Antoniou >> wrote: >>> Hi Alexandre, >>> On Dec 4, 2014, at 16:41 , Alexandre Courbot wrote: On Thu,

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Pantelis Antoniou
Hi Alexandre, > On Dec 4, 2014, at 16:58 , Alexandre Courbot wrote: > > On Thu, Dec 4, 2014 at 11:47 PM, Pantelis Antoniou > wrote: >> Hi Alexandre, >> >>> On Dec 4, 2014, at 16:41 , Alexandre Courbot wrote: >>> >>> On Thu, Dec 4, 2014 at 11:27 PM, Pantelis Antoniou >>> wrote: Hi Alexa

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Alexandre Courbot
On Thu, Dec 4, 2014 at 11:52 PM, Maxime Ripard wrote: > Hi again, > > It looks like I missed some part of it. > > On Thu, Dec 04, 2014 at 11:15:38PM +0900, Alexandre Courbot wrote: >> > GPIO hogging needs to be the ideal solution for that, since we can >> > just enforce the GPIO14 value as the dri

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Alexandre Courbot
On Thu, Dec 4, 2014 at 11:47 PM, Pantelis Antoniou wrote: > Hi Alexandre, > >> On Dec 4, 2014, at 16:41 , Alexandre Courbot wrote: >> >> On Thu, Dec 4, 2014 at 11:27 PM, Pantelis Antoniou >> wrote: >>> Hi Alexandre, >>> >>> I tried to stay away while things are being fleshed out but… >>> On

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Maxime Ripard
Hi again, It looks like I missed some part of it. On Thu, Dec 04, 2014 at 11:15:38PM +0900, Alexandre Courbot wrote: > > GPIO hogging needs to be the ideal solution for that, since we can > > just enforce the GPIO14 value as the driver is probed, which provides > > the guarantee that any driver u

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Alexandre Courbot
On Thu, Dec 4, 2014 at 11:27 PM, Maxime Ripard wrote: > Hi, > > On Thu, Dec 04, 2014 at 11:15:38PM +0900, Alexandre Courbot wrote: >> On Wed, Dec 3, 2014 at 1:12 AM, Maxime Ripard >> wrote: >> > On Tue, Dec 02, 2014 at 03:29:46PM +0100, Linus Walleij wrote: >> >> On Tue, Dec 2, 2014 at 3:13 PM, A

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Pantelis Antoniou
Hi Alexandre, > On Dec 4, 2014, at 16:41 , Alexandre Courbot wrote: > > On Thu, Dec 4, 2014 at 11:27 PM, Pantelis Antoniou > wrote: >> Hi Alexandre, >> >> I tried to stay away while things are being fleshed out but… >> >>> On Dec 4, 2014, at 16:15 , Alexandre Courbot wrote: >>> >>> On Wed,

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Alexandre Courbot
On Thu, Dec 4, 2014 at 11:27 PM, Pantelis Antoniou wrote: > Hi Alexandre, > > I tried to stay away while things are being fleshed out but… > >> On Dec 4, 2014, at 16:15 , Alexandre Courbot wrote: >> >> On Wed, Dec 3, 2014 at 1:12 AM, Maxime Ripard >> wrote: >>> On Tue, Dec 02, 2014 at 03:29:46PM

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Maxime Ripard
Hi, On Thu, Dec 04, 2014 at 11:15:38PM +0900, Alexandre Courbot wrote: > On Wed, Dec 3, 2014 at 1:12 AM, Maxime Ripard > wrote: > > On Tue, Dec 02, 2014 at 03:29:46PM +0100, Linus Walleij wrote: > >> On Tue, Dec 2, 2014 at 3:13 PM, Alexandre Courbot wrote: > >> > On Tue, Dec 2, 2014 at 1:36 AM,

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Pantelis Antoniou
Hi Alexandre, I tried to stay away while things are being fleshed out but… > On Dec 4, 2014, at 16:15 , Alexandre Courbot wrote: > > On Wed, Dec 3, 2014 at 1:12 AM, Maxime Ripard > wrote: >> On Tue, Dec 02, 2014 at 03:29:46PM +0100, Linus Walleij wrote: >>> On Tue, Dec 2, 2014 at 3:13 PM, Alex

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-04 Thread Alexandre Courbot
On Wed, Dec 3, 2014 at 1:12 AM, Maxime Ripard wrote: > On Tue, Dec 02, 2014 at 03:29:46PM +0100, Linus Walleij wrote: >> On Tue, Dec 2, 2014 at 3:13 PM, Alexandre Courbot wrote: >> > On Tue, Dec 2, 2014 at 1:36 AM, Maxime Ripard >> > wrote: >> >> >> The only thing I'd like to have would be that

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-02 Thread Maxime Ripard
On Tue, Dec 02, 2014 at 03:29:46PM +0100, Linus Walleij wrote: > On Tue, Dec 2, 2014 at 3:13 PM, Alexandre Courbot wrote: > > On Tue, Dec 2, 2014 at 1:36 AM, Maxime Ripard > > wrote: > > >> The only thing I'd like to have would be that the request here would > >> be non-exclusive, so that a late

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-02 Thread Linus Walleij
On Tue, Dec 2, 2014 at 3:13 PM, Alexandre Courbot wrote: > On Tue, Dec 2, 2014 at 1:36 AM, Maxime Ripard > wrote: >> The only thing I'd like to have would be that the request here would >> be non-exclusive, so that a later driver would still be allowed later >> on to request that GPIO later on a

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-02 Thread Linus Walleij
On Tue, Dec 2, 2014 at 3:10 PM, Alexandre Courbot wrote: > On Tue, Dec 2, 2014 at 9:22 AM, Benoit Parrot wrote: >>> > + } >>> > + >>> > + if (tmp > MAX_PHANDLE_ARGS) { >>> > + desc = ERR_PTR(-EINVAL); >>> > + goto out; >>> > + } >>> > + >>> > +

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-02 Thread Linus Walleij
On Tue, Dec 2, 2014 at 1:22 AM, Benoit Parrot wrote: > Alexandre Courbot wrote on Fri [2014-Nov-28 16:30:01 > +0900]: >> On Fri, Nov 21, 2014 at 8:54 AM, Benoit Parrot wrote: >> > + } >> > + >> > + if (tmp > MAX_PHANDLE_ARGS) { >> > + desc = ERR_PTR(-EINVAL); >> > +

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-02 Thread Alexandre Courbot
On Tue, Dec 2, 2014 at 1:36 AM, Maxime Ripard wrote: > Hi, > > On Fri, Nov 28, 2014 at 04:30:01PM +0900, Alexandre Courbot wrote: >> > +/** >> > + * do_gpio_hog - Given node is a GPIO hog configuration, handle it >> > + * @np:device node to get GPIO from >> > + * >> > + * This is o

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-02 Thread Alexandre Courbot
On Tue, Dec 2, 2014 at 9:22 AM, Benoit Parrot wrote: >> > + } >> > + >> > + if (tmp > MAX_PHANDLE_ARGS) { >> > + desc = ERR_PTR(-EINVAL); >> > + goto out; >> > + } >> > + >> > + gg_data.gpiospec.args_count = tmp; >> > + gg_data.gpiospec.np

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-01 Thread Benoit Parrot
Maxime Ripard wrote on Mon [2014-Dec-01 17:36:39 +0100]: > Hi, > > On Fri, Nov 28, 2014 at 04:30:01PM +0900, Alexandre Courbot wrote: > > > +/** > > > + * do_gpio_hog - Given node is a GPIO hog configuration, handle it > > > + * @np:device node to get GPIO from > > > + * > > > +

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-01 Thread Benoit Parrot
Alexandre Courbot wrote on Fri [2014-Nov-28 16:30:01 +0900]: > On Fri, Nov 21, 2014 at 8:54 AM, Benoit Parrot wrote: > > Based on Boris Brezillion's work this is a reworked patch > > of his initial GPIO hogging mechanism. > > This patch provides a way to initally configure specific GPIO > > when

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-12-01 Thread Maxime Ripard
Hi, On Fri, Nov 28, 2014 at 04:30:01PM +0900, Alexandre Courbot wrote: > > +/** > > + * do_gpio_hog - Given node is a GPIO hog configuration, handle it > > + * @np:device node to get GPIO from > > + * > > + * This is only used by of_gpiochip_add to request/set GPIO initial > > + *

Re: [Patch v2 1/2] gpio: add GPIO hogging mechanism

2014-11-27 Thread Alexandre Courbot
On Fri, Nov 21, 2014 at 8:54 AM, Benoit Parrot wrote: > Based on Boris Brezillion's work this is a reworked patch > of his initial GPIO hogging mechanism. > This patch provides a way to initally configure specific GPIO > when the gpio controller is probed. > > The actual DT scanning to collect the