Re: [PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-11-02 Thread Roland Stigge
On 10/31/2012 07:59 PM, Grant Likely wrote: >> Pin direction currently needs to be set up separately, analogous to >> requesting gpios. Need to document this better, right. The assumption is >> that I/O needs to be efficient primarily, before bloating the API with >> direction functions. Or should

Re: [PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-11-01 Thread Grant Likely
On Wed, Oct 31, 2012 at 8:30 PM, Mark Brown wrote: > On Wed, Oct 31, 2012 at 04:00:17PM +0100, Grant Likely wrote: > >> For the API, I don't think it is a good idea at all to try and >> abstract away gpios on multiple controllers. I understand that it >> makes life a lot easier for userspace to ab

Re: [PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-11-01 Thread Jean-Christophe PLAGNIOL-VILLARD
On 19:59 Wed 31 Oct , Grant Likely wrote: > Hi Roland > > On Wed, Oct 31, 2012 at 6:19 PM, Roland Stigge wrote: > > On 10/31/2012 04:00 PM, Grant Likely wrote: > >> For the API, I don't think it is a good idea at all to try and > >> abstract away gpios on multiple controllers. I understand th

Re: [PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-10-31 Thread Mark Brown
On Wed, Oct 31, 2012 at 04:00:17PM +0100, Grant Likely wrote: > For the API, I don't think it is a good idea at all to try and > abstract away gpios on multiple controllers. I understand that it > makes life a lot easier for userspace to abstract those details away, > but the problem is that it hi

Re: [PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-10-31 Thread Grant Likely
Hi Roland On Wed, Oct 31, 2012 at 6:19 PM, Roland Stigge wrote: > On 10/31/2012 04:00 PM, Grant Likely wrote: >> For the API, I don't think it is a good idea at all to try and >> abstract away gpios on multiple controllers. I understand that it >> makes life a lot easier for userspace to abstract

Re: [PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-10-31 Thread Roland Stigge
Hi Linus, thanks for your notes, comments below: On 10/31/2012 03:06 PM, Linus Walleij wrote: >> +struct gpio_block *gpio_block_create(unsigned *gpios, size_t size, >> +const char *name) >> +{ >> + struct gpio_block *block; >> + struct gpio_block_ch

Re: [PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-10-31 Thread Roland Stigge
Hi Grant, thank you for your feedback! Notes below. On 10/31/2012 04:00 PM, Grant Likely wrote: > Linus and I just sat down and talked about your changes. I think I > understand what you need to do, but I've got concerns about the > approach. I'm already not a big fan of the sysfs gpio interface

Re: [PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-10-31 Thread Grant Likely
On Sun, Oct 28, 2012 at 9:46 PM, Roland Stigge wrote: > The recurring task of providing simultaneous access to GPIO lines (especially > for bit banging protocols) needs an appropriate API. > > This patch adds a kernel internal "Block GPIO" API that enables simultaneous > access to several GPIOs. T

Re: [PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-10-31 Thread Linus Walleij
On Sun, Oct 28, 2012 at 9:46 PM, Roland Stigge wrote: Just a quick few things I spotted: > +struct gpio_block *gpio_block_create(unsigned *gpios, size_t size, > +const char *name) > +{ > + struct gpio_block *block; > + struct gpio_block_chip *gbc;

[PATCH RESEND 1/5 v6] gpio: Add a block GPIO API to gpiolib

2012-10-28 Thread Roland Stigge
The recurring task of providing simultaneous access to GPIO lines (especially for bit banging protocols) needs an appropriate API. This patch adds a kernel internal "Block GPIO" API that enables simultaneous access to several GPIOs. This is done by abstracting GPIOs to an n-bit word: Once requeste