From f0a83701399123b0e95cc4d949fcccf9941fd190 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Mon, 13 Apr 2009 15:03:11 +0800 Subject: [ARM] pxa: move mach/i2c.h to plat/i2c.h Signed-off-by: Paul Shen Signed-off-by: Eric Miao --- arch/arm/mach-pxa/imote2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa/imote2.c') diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index 2121309b247..821e65a4097 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include -- cgit v1.2.3 From 46580c03062da8c047238a6b3d2b2b13af1700b5 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Tue, 14 Apr 2009 08:33:49 +0300 Subject: [ARM] pxa: update pxa2xx_spi_chip initialization to use .gpio_cs field Signed-off-by: Mike Rapoport Signed-off-by: Eric Miao --- arch/arm/mach-pxa/imote2.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'arch/arm/mach-pxa/imote2.c') diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index 821e65a4097..3ef98d43d30 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c @@ -456,25 +456,12 @@ static struct pxa2xx_spi_master pxa_ssp_master_2_info = { .num_chipselect = 1, }; -/* Patch posted by Eric Miao will remove - * the need for these functions. - */ -static void spi1control(u32 command) -{ - gpio_set_value(24, command & PXA2XX_CS_ASSERT ? 0 : 1); -}; - -static void spi3control(u32 command) -{ - gpio_set_value(39, command & PXA2XX_CS_ASSERT ? 0 : 1); -}; - static struct pxa2xx_spi_chip staccel_chip_info = { .tx_threshold = 8, .rx_threshold = 8, .dma_burst_size = 8, .timeout = 235, - .cs_control = spi1control, + .gpio_cs = 24, }; static struct pxa2xx_spi_chip cc2420_info = { @@ -482,7 +469,7 @@ static struct pxa2xx_spi_chip cc2420_info = { .rx_threshold = 8, .dma_burst_size = 8, .timeout = 235, - .cs_control = spi3control, + .gpio_cs = 39, }; static struct spi_board_info spi_board_info[] __initdata = { @@ -538,8 +525,6 @@ static void __init imote2_init(void) /* SPI chip select directions - all other directions should * be handled by drivers.*/ gpio_direction_output(37, 0); - gpio_direction_output(24, 0); - gpio_direction_output(39, 0); platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); -- cgit v1.2.3 From a2520846589ee9821f9f50744cece84f2853518a Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Mon, 25 May 2009 16:50:12 +0000 Subject: [ARM] pxa/imote2: add board config for SHT15 humidity sensor Signed-off-by: Jonathan Cameron Signed-off-by: Eric Miao --- arch/arm/mach-pxa/imote2.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'arch/arm/mach-pxa/imote2.c') diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index 3ef98d43d30..f022247f9ed 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -102,6 +103,10 @@ static unsigned long imote2_pin_config[] __initdata = { GPIO96_GPIO, /* accelerometer interrupt */ GPIO99_GPIO, /* ADC interrupt */ + /* SHT15 */ + GPIO100_GPIO, + GPIO98_GPIO, + /* Connector pins specified as gpios */ GPIO94_GPIO, /* large basic connector pin 14 */ GPIO10_GPIO, /* large basic connector pin 23 */ @@ -112,6 +117,26 @@ static unsigned long imote2_pin_config[] __initdata = { GPIO105_GPIO, /* blue led */ }; +static struct sht15_platform_data platform_data_sht15 = { + .gpio_data = 100, + .gpio_sck = 98, +}; + +static struct platform_device sht15 = { + .name = "sht15", + .id = -1, + .dev = { + .platform_data = &platform_data_sht15, + }, +}; + +static struct regulator_consumer_supply imote2_sensor_3_con[] = { + { + .dev = &sht15.dev, + .supply = "vcc", + }, +}; + static struct gpio_led imote2_led_pins[] = { { .name = "imote2:red", @@ -257,6 +282,8 @@ static struct regulator_init_data imote2_ldo_init_data[] = { .min_uV = 2800000, .max_uV = 3000000, }, + .num_consumer_supplies = ARRAY_SIZE(imote2_sensor_3_con), + .consumer_supplies = imote2_sensor_3_con, }, [vcc_pxa_pll] = { /* 1.17V - 1.43V, default 1.3V*/ .constraints = { @@ -508,6 +535,7 @@ static struct pxa2xx_udc_mach_info imote2_udc_info __initdata = { static struct platform_device *imote2_devices[] = { &imote2_flash_device, &imote2_leds, + &sht15, }; static struct i2c_pxa_platform_data i2c_pwr_pdata = { -- cgit v1.2.3 From 0a0ca89d59b203b772a08d04d4e2052ffaeac221 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Mon, 25 May 2009 16:50:14 +0000 Subject: [ARM] pxa/imote2: add i2c board info for the wm8940 audio codec Signed-off-by: Jonathan Cameron Signed-off-by: Eric Miao --- arch/arm/mach-pxa/imote2.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/mach-pxa/imote2.c') diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index f022247f9ed..be7be72dace 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c @@ -459,6 +459,9 @@ static struct i2c_board_info __initdata imote2_i2c_board_info[] = { .type = "tmp175", .addr = 0x4A, .irq = IRQ_GPIO(96), + }, { /* IMB400 Multimedia board */ + .type = "wm8940", + .addr = 0x1A, }, }; -- cgit v1.2.3