Re: Fw: [3.18.3] poll() on gpio pins broken

2015-02-19 Thread folkert
Try using lseek before reading the data after the poll. EX. if (fdset[0].revents POLLPRI) { lseek(fdset[0].fd, 0, SEEK_SET); len = read(fdset[0].fd, buf, MAX_BUF); . . } See if this helps.

Re: [Patch v6 0/2] gpio: add GPIO hogging mechanism

2015-02-19 Thread Michael Welling
On Wed, Feb 18, 2015 at 11:23:42AM -0600, Benoit Parrot wrote: Gentle ping. Is there any chance this will make it in 3.21? Benoit Is there a reason that the pin has to be hogged? Couldn't the pin be released after configuration for eventual use in the userspace? Parrot, Benoit

Re: [PATCH] gpio: return NULL from gpiod_get_optional when GPIOLIB is disabled

2015-02-19 Thread Alexandre Courbot
On Fri, Feb 20, 2015 at 2:33 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: I should have commented at that time, but let's do it now: I agree with the idea, but this leaves the door open to confusing situations in case gpiolib was unintentionally disabled. Could you also add a note in

Re: [PATCH] gpio: return NULL from gpiod_get_optional when GPIOLIB is disabled

2015-02-19 Thread Alexandre Courbot
On Fri, Feb 20, 2015 at 9:30 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Given the intent behind gpiod_get_optional() and friends it does not make sense to return -ENOSYS when GPIOLIB is disabled: the driver is expected to work just fine without gpio so let's behave as if gpio was not

Re: [PATCH] gpio: return NULL from gpiod_get_optional when GPIOLIB is disabled

2015-02-19 Thread Dmitry Torokhov
On Fri, Feb 20, 2015 at 01:59:43PM +0900, Alexandre Courbot wrote: On Fri, Feb 20, 2015 at 9:30 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Given the intent behind gpiod_get_optional() and friends it does not make sense to return -ENOSYS when GPIOLIB is disabled: the driver is

[PATCH] gpio: return NULL from gpiod_get_optional when GPIOLIB is disabled

2015-02-19 Thread Dmitry Torokhov
Given the intent behind gpiod_get_optional() and friends it does not make sense to return -ENOSYS when GPIOLIB is disabled: the driver is expected to work just fine without gpio so let's behave as if gpio was not found. Otherwise we have to special-case -ENOSYS in drivers. Signed-off-by: Dmitry

Re: [PATCH 02/14] ARM: ARMv7M: Enlarge vector table to 256 entries

2015-02-19 Thread Maxime Coquelin
Hi Rob, 2015-02-15 23:42 GMT+01:00 Rob Herring robherri...@gmail.com: On Fri, Feb 13, 2015 at 2:42 AM, Maxime Coquelin mcoquelin.st...@gmail.com wrote: Hi Geert, 2015-02-12 21:34 GMT+01:00 Geert Uytterhoeven ge...@linux-m68k.org: On Thu, Feb 12, 2015 at 6:45 PM, Maxime Coquelin

Re: [PATCH 02/14] ARM: ARMv7M: Enlarge vector table to 256 entries

2015-02-19 Thread Rob Herring
On Thu, Feb 19, 2015 at 10:13 AM, Maxime Coquelin mcoquelin.st...@gmail.com wrote: Hi Rob, 2015-02-15 23:42 GMT+01:00 Rob Herring robherri...@gmail.com: On Fri, Feb 13, 2015 at 2:42 AM, Maxime Coquelin mcoquelin.st...@gmail.com wrote: Hi Geert, 2015-02-12 21:34 GMT+01:00 Geert Uytterhoeven

Re: Fw: [3.18.3] poll() on gpio pins broken

2015-02-19 Thread Linus Walleij
On Thu, Feb 19, 2015 at 9:53 AM, folkert folk...@vanheusden.com wrote: I also think that this interface is cumbersome. I did not measure it(!) but I think adding this open/seek + read construction may add all kinds of overhead. Especially since my use-case requires the lowest latency