Re: [PATCH 8/9] gpiolib: use gpio_chips list in gpio_to_desc

2013-02-09 Thread Grant Likely
On Sat, Feb 9, 2013 at 2:21 PM, Alexandre Courbot wrote: > On Sat, Feb 9, 2013 at 6:58 PM, Grant Likely > wrote: >> I'm actually going to NAK this one. This is a hot path. Having a O(1) >> lookup from gpio number to gpio desc is important. I know you want to be >> rid of the gpio_desc table enti

Re: [PATCH 8/9] gpiolib: use gpio_chips list in gpio_to_desc

2013-02-09 Thread Alexandre Courbot
On Sat, Feb 9, 2013 at 6:58 PM, Grant Likely wrote: > I'm actually going to NAK this one. This is a hot path. Having a O(1) > lookup from gpio number to gpio desc is important. I know you want to be > rid of the gpio_desc table entirely, but in this case I think it is > warranted. However, you can

Re: [PATCH 8/9] gpiolib: use gpio_chips list in gpio_to_desc

2013-02-09 Thread Grant Likely
On Sun, 3 Feb 2013 01:29:31 +0900, Alexandre Courbot wrote: > Parse the list of chips to find the descriptor corresponding to a GPIO > number instead of directly picking the entry of the global gpio_desc[] > array, which is due to be removed. > > This turns the complexity of converting a GPIO n

Re: [PATCH 8/9] gpiolib: use gpio_chips list in gpio_to_desc

2013-02-05 Thread Linus Walleij
On Sat, Feb 2, 2013 at 5:29 PM, Alexandre Courbot wrote: > Parse the list of chips to find the descriptor corresponding to a GPIO > number instead of directly picking the entry of the global gpio_desc[] > array, which is due to be removed. > > This turns the complexity of converting a GPIO number

[PATCH 8/9] gpiolib: use gpio_chips list in gpio_to_desc

2013-02-02 Thread Alexandre Courbot
Parse the list of chips to find the descriptor corresponding to a GPIO number instead of directly picking the entry of the global gpio_desc[] array, which is due to be removed. This turns the complexity of converting a GPIO number into a descriptor from O(1) to O(n) where n is the number of GPIO c