Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-21 Thread Bartosz Golaszewski
sob., 20 lip 2019 o 21:45 Linus Walleij napisał(a): > > On Sat, Jul 20, 2019 at 8:03 PM Bartosz Golaszewski > wrote: > > > I'll apply it to my local tree and send it for v5.3-rc2. > > OK! Do you see it as bug fix so it should go in the rcs? > > It pretty much needs to be a regression to go in the

Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-20 Thread Linus Walleij
On Sat, Jul 20, 2019 at 8:03 PM Bartosz Golaszewski wrote: > I'll apply it to my local tree and send it for v5.3-rc2. OK! Do you see it as bug fix so it should go in the rcs? It pretty much needs to be a regression to go in there, because this stub stuff blew up in my face before :/ Thanks, Li

Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-20 Thread Bartosz Golaszewski
wt., 16 lip 2019 o 23:46 Linus Walleij napisał(a): > > On Tue, Jul 9, 2019 at 4:20 PM Bartosz Golaszewski wrote: > > wt., 9 lip 2019 o 15:30 Linus Walleij napisał(a): > > > > I was thinking something like this in the stubs: > > > > > > gpiod_get[_index]() { > > > return POISON; > > > } > > >

Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-16 Thread Linus Walleij
On Tue, Jul 9, 2019 at 4:20 PM Bartosz Golaszewski wrote: > wt., 9 lip 2019 o 15:30 Linus Walleij napisał(a): > > I was thinking something like this in the stubs: > > > > gpiod_get[_index]() { > > return POISON; > > } > > > > gpiod_get[_index]_optional() { > >return NULL; > > } > > This

Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-10 Thread Claus H. Stovgaard
Hi Linus On tir, 2019-07-09 at 15:30 +0200, Linus Walleij wrote: > > I remember I had this discussion in the past, and I made a large > refactoring to make it possible for drivers that need gpiod_* > calls to simply do: > > select GPIOLIB > > in Kconfig. > > This should solve also this problem

Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-10 Thread Enrico Weigelt, metux IT consult
On 09.07.19 15:30, Linus Walleij wrote: Hi, > I remember I had this discussion in the past, and I made a large> refactoring > to make it possible for drivers that need gpiod_*> calls to simply do:> > select GPIOLIB> > in Kconfig. Would that allow enabling gpio consumers or drivers selectable w/o

Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-09 Thread Bartosz Golaszewski
wt., 9 lip 2019 o 15:30 Linus Walleij napisał(a): > > Hi Bartosz, > > On Mon, Jul 8, 2019 at 10:25 AM Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > If gpiolib is disabled, we use the inline stubs from gpio/consumer.h > > instead of regular definitions of GPIO API. The stubs

Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-09 Thread Linus Walleij
Hi Bartosz, On Mon, Jul 8, 2019 at 10:25 AM Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > If gpiolib is disabled, we use the inline stubs from gpio/consumer.h > instead of regular definitions of GPIO API. The stubs for 'optional' > variants of gpiod_get routines return NULL in this

Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-08 Thread Claus H. Stovgaard
On Mon, 2019-07-08 at 10:23 +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > If gpiolib is disabled, we use the inline stubs from gpio/consumer.h > instead of regular definitions of GPIO API. The stubs for 'optional' > variants of gpiod_get routines return NULL in this case as if

[PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled

2019-07-08 Thread Bartosz Golaszewski
From: Bartosz Golaszewski If gpiolib is disabled, we use the inline stubs from gpio/consumer.h instead of regular definitions of GPIO API. The stubs for 'optional' variants of gpiod_get routines return NULL in this case as if the relevant GPIO wasn't found. This is correct so far. Calling other