[PATCH v2 6/7] ARM: davinci: dmxxx: gpio device creation

Sekhar Nori nsekhar at ti.com
Thu Jun 20 04:55:44 EDT 2013


On 6/14/2013 3:05 PM, Philip Avinash wrote:
> Create davinci gpio device and remove gpio references in
> davinci_soc_info structure for dmxxx platforms. Also add Memory and IRQ
> resources for GPIO platform device.
> 
> Signed-off-by: Philip Avinash <avinashphilip at ti.com>
> Acked-by: Linus Walleij <linus.walleij at linaro.org>
> Signed-off-by: Sekhar Nori <nsekhar at ti.com>
> ---
> Changes since v1:
> 	- Add commit message
> 
>  arch/arm/mach-davinci/board-dm355-evm.c     |   27 ++++++++++++++++++++++++++
>  arch/arm/mach-davinci/board-dm355-leopard.c |    1 +
>  arch/arm/mach-davinci/board-dm365-evm.c     |   28 +++++++++++++++++++++++++++
>  arch/arm/mach-davinci/board-dm644x-evm.c    |   26 +++++++++++++++++++++++++
>  arch/arm/mach-davinci/board-dm646x-evm.c    |   27 ++++++++++++++++++++++++++
>  arch/arm/mach-davinci/board-neuros-osd2.c   |    1 +
>  arch/arm/mach-davinci/dm355.c               |    4 ----
>  arch/arm/mach-davinci/dm365.c               |    5 -----
>  arch/arm/mach-davinci/dm644x.c              |    4 ----
>  arch/arm/mach-davinci/dm646x.c              |    4 ----
>  arch/arm/mach-davinci/include/mach/common.h |    2 ++
>  11 files changed, 112 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
> index c2a0a67..05e6e86 100644
> --- a/arch/arm/mach-davinci/board-dm355-evm.c
> +++ b/arch/arm/mach-davinci/board-dm355-evm.c
> @@ -28,9 +28,11 @@
>  
>  #include <linux/platform_data/i2c-davinci.h>
>  #include <mach/serial.h>
> +#include <mach/common.h>
>  #include <linux/platform_data/mtd-davinci.h>
>  #include <linux/platform_data/mmc-davinci.h>
>  #include <linux/platform_data/usb-davinci.h>
> +#include <linux/platform_data/gpio-davinci.h>
>  
>  #include "davinci.h"
>  
> @@ -376,9 +378,34 @@ static struct spi_board_info dm355_evm_spi_info[] __initconst = {
>  	},
>  };
>  
> +static struct resource dm355_gpio_resources[] = {
> +	{ /* registers */
> +		.start	= DAVINCI_GPIO_BASE,
> +		.end	= DAVINCI_GPIO_BASE + SZ_4K - 1,
> +		.flags	= IORESOURCE_MEM,
> +	},
> +	{ /* interrupt */
> +		.start	= IRQ_DM355_GPIOBNK0,
> +		.end	= IRQ_DM355_GPIOBNK6,
> +		.flags	= IORESOURCE_IRQ,
> +	},
> +};

Don't add these resource in board files. Granted we are not going to add
more board files, but that does not mean we add soc specific data into
board files. You need to move this into the respective SoC files.

Thanks,
Sekhar



More information about the linux-arm-kernel mailing list