[U-Boot] [PATCH 2/9 v2] i.MX31: add a simple gpio driver

Anatolij Gustschin agust at denx.de
Thu Feb 5 17:07:23 CET 2009


Guennadi Liakhovetski wrote:

>>> +/* GPIO port description */
>>> +static unsigned long gpio_ports[] = {
>>> +	[0] = 0x53fcc000,
>>> +	[1] = 0x53fd0000,
>>> +	[2] = 0x53fa4000,
>>> +};
>> Ilya send a patch for mx31 GPIO register definitions today
>> http://lists.denx.de/pipermail/u-boot/2009-February/046884.html
>>
>> Could you please provide additional patch for drivers/gpio/mx31_gpio.c
>> based on Ilya's patch to use these GPIOx_BASE macros here and to
>> use GPIO_DR / GPIO_GDIR for 0 / 4 below? Thanks!
> 
> Do you mean an incremental patch or a v3?

yes, an incremental patch, as I don't know when Ilya's patch
will be applied. This way we will be able to use the driver now
(not dependent on Ilya's patch) and fix things later by
applying an incremental patch.

>>> +#ifdef CONFIG_MX31_GPIO
>>> +extern int mx31_gpio_direction(unsigned int gpio,
>>> +			       enum mx31_gpio_direction direction);
>> ________________________^^^^^^^
>> please remove spaces here, Thanks!
> 
> No, these are intentional and correct. They align beginning of the second 
> line with the first character after the opening parenthesis.

yes this is correct, I'm aware of it. But while reviewing the spi patch
an so looking on the code in drivers/spi/mxc_spi.c I noticed that
you also used indentation by tabs in spi_xfer() and spi_setup_slave()
and also in the mx31_gpio_direction() prototype definition. So it
seemed for me that you would prefer to use indentation by tabs here.
So ignore this one please, Sorry.

Thanks,
Anatolij


More information about the U-Boot mailing list