Signed-off-by: Jonathan Cameron <[email protected]>
---
arch/arm/mach-pxa/stargate2.c | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index a98a434..4a70c17 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -51,6 +51,7 @@
#include <linux/spi/spi.h>
#include <linux/mfd/da903x.h>
#include <linux/sht15.h>
+#include <linux/spi/cc2420.h>
#include "devices.h"
#include "generic.h"
@@ -695,6 +696,22 @@ static struct pxa2xx_spi_chip cc2420_info = {
.gpio_cs = 39,
};
+#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 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 = {
{
.modalias = "lis3l02dq",
@@ -709,6 +726,8 @@ static struct spi_board_info spi_board_info[] __initdata = {
.bus_num = 3,
.chip_select = 0,
.controller_data = &cc2420_info,
+ .platform_data = &cc2420_pdata,
+
},
};
@@ -764,10 +783,6 @@ static void __init stargate2_init(void)
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
- /* spi chip selects */
- gpio_direction_output(37, 0);
- gpio_direction_output(24, 0);
- gpio_direction_output(39, 0);
platform_add_devices(ARRAY_AND_SIZE(stargate2_devices));
--
1.7.0.4
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Linux-zigbee-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel