[RFC PATCH 1/5] gemini: convert to basic-mmio-gpio

Sergei Shtylyov sshtylyov at mvista.com
Wed Apr 13 07:46:49 EDT 2011


Hello.

On 12-04-2011 18:37, Anton Vorontsov wrote:

>> The basic-mmio-gpio driver is capable of supporting this controller so
>> convert the platform to use it for basic GPIO support.

>> Cc: Hans Ulli Kroll<ulli.kroll at googlemail.com>
>> Signed-off-by: Jamie Iles<jamie at jamieiles.com>
>> ---
> [...]
>> +#define GPIO_RES(__name, __addr) \
>> +	{ \
>> +		.start = (__addr), \
>> +		.end = (__addr) + 0x3, \
>> +		.flags = IORESOURCE_MEM, \
>> +		.name = #__name, \
>> +	}

> Btw, how about moving this (repetitive) macro into basic_mmio_gpio.h?

> Assuming, that there could be IRQ resources later, making
> something like BGPIO_MEM_RES(name, addr, sz)?

> Or, even better, some generic shorthand macro in linux/ioport.h?

> #define IORES(__type, __name, __addr, __size)	\
> 	{					\
> 		.start = (__addr), 		\
> 		.end = (__addr) + (__size),	\

    You forgot to subtract 1.

> Thanks,

WBR, Sergei



More information about the linux-arm-kernel mailing list