Now that the cc2420 driver has landed mainline we could supply the GPIO setup via platform data and remove them from the MFP table.
Signed-off-by: Stefan Schmidt <ste...@datenfreihafen.org> --- arch/arm/mach-pxa/imote2.c | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index 5b0862d..c99f04e 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c @@ -23,6 +23,7 @@ #include <linux/i2c.h> #include <linux/mfd/da903x.h> #include <linux/sht15.h> +#include <linux/spi/cc2420.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -39,6 +40,13 @@ #include "devices.h" #include "generic.h" +#define GPIO_FIFOP 0 +#define GPIO_SFD 16 +#define GPIO_RESET 22 +#define GPIO_FIFO 114 +#define GPIO_VREG 115 +#define GPIO_CCA 116 + static unsigned long imote2_pin_config[] __initdata = { /* Device Identification for wakeup*/ @@ -58,15 +66,6 @@ static unsigned long imote2_pin_config[] __initdata = { GPIO110_MMC_DAT_2, GPIO111_MMC_DAT_3, - /* 802.15.4 radio - driver out of mainline */ - GPIO22_GPIO, /* CC_RSTN */ - GPIO114_GPIO, /* CC_FIFO */ - GPIO116_GPIO, /* CC_CCA */ - GPIO0_GPIO, /* CC_FIFOP */ - GPIO16_GPIO, /* CCSFD */ - GPIO39_GPIO, /* CSn */ - GPIO115_GPIO, /* Power enable */ - /* I2C */ GPIO117_I2C_SCL, GPIO118_I2C_SDA, @@ -505,6 +504,15 @@ static struct pxa2xx_spi_chip cc2420_info = { .gpio_cs = 39, }; +static struct cc2420_platform_data cc2420_pdata = { + .fifo = GPIO_FIFO, + .cca = GPIO_CCA, + .fifop = GPIO_FIFOP, + .sfd = GPIO_SFD, + .reset = GPIO_RESET, + .vreg = GPIO_VREG, +}; + static struct spi_board_info spi_board_info[] __initdata = { { /* Driver in IIO */ .modalias = "lis3l02dq", @@ -519,6 +527,7 @@ static struct spi_board_info spi_board_info[] __initdata = { .bus_num = 3, .chip_select = 0, .controller_data = &cc2420_info, + .platform_data = &cc2420_pdata, }, }; -- 1.7.1 ------------------------------------------------------------------------------ _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel