Re: [PATCH/RFC] CPM1: implement GPIO API

2007-12-13 Thread Arnd Bergmann
On Thursday 13 December 2007, Scott Wood wrote: > > +} > > +EXPORT_SYMBOL_GPL(gpio_request); > > This is an API, not internals; can we stick with plain EXPORT_SYMBOL()? The architecture independent API posted by David Brownell uses _GPL, see http://lkml.org/lkml/2007/11/9/141. I'd vote for _GPL

Re: [PATCH/RFC] CPM1: implement GPIO API

2007-12-13 Thread Scott Wood
On Thu, Dec 13, 2007 at 03:53:45AM +0300, Anton Vorontsov wrote: > No. This is how gpio api is working currently. With gpiolib[1], most of > these functions will be controller-specific. IIRC, gpiolib is still in > early development stage, so, for now, we have to limit us to one gpio > chip controll

Re: [PATCH/RFC] CPM1: implement GPIO API

2007-12-13 Thread Scott Wood
On Wed, Dec 12, 2007 at 05:42:06PM +0100, Jochen Friedrich wrote: > +int cpm_init_par_io(void) > +{ > + int ret; > + struct device_node *np; > + const u32 *num_ports; > + int i; > + > + np = of_find_node_by_name(NULL, "par_io"); > + if (!np) { > + ret = -ENOENT;

Re: [PATCH/RFC] CPM1: implement GPIO API

2007-12-12 Thread Anton Vorontsov
On Wed, Dec 12, 2007 at 11:16:33PM +0100, Arnd Bergmann wrote: > On Wednesday 12 December 2007, Jochen Friedrich wrote: > > > +static spinlock_t *cpm1_port_locks; > > +static int cpm1_num_ports; > > Having an array of spinlocks is rather unusual and normally not necessary. > Did you measure a sig

Re: [PATCH/RFC] CPM1: implement GPIO API

2007-12-12 Thread Arnd Bergmann
On Wednesday 12 December 2007, Jochen Friedrich wrote: > +static spinlock_t *cpm1_port_locks; > +static int cpm1_num_ports; Having an array of spinlocks is rather unusual and normally not necessary. Did you measure a significant performance impact by using a global lock for all ports? If not, I

[PATCH/RFC] CPM1: implement GPIO API

2007-12-12 Thread Jochen Friedrich
This is based on [PATCH RFC 3/7] [POWERPC] CPM2: implement GPIO API. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- arch/powerpc/platforms/8xx/Kconfig |1 + arch/powerpc/sysdev/commproc.c | 199 +++- 2 files changed, 199 insertions(+), 1 deletions