diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2009-05-25 12:50:12 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-06-04 22:46:43 -0400 |
commit | a2520846589ee9821f9f50744cece84f2853518a (patch) | |
tree | fb4ffd3da9762bb0f31895e6bc89d2f603612e24 /arch/arm/mach-pxa/imote2.c | |
parent | 5aeb1a5e9f2eced482805eeb154baf77ea53c8ce (diff) |
[ARM] pxa/imote2: add board config for SHT15 humidity sensor
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/imote2.c')
-rw-r--r-- | arch/arm/mach-pxa/imote2.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index 3ef98d43d303..f022247f9ed7 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/mfd/da903x.h> | 24 | #include <linux/mfd/da903x.h> |
25 | #include <linux/sht15.h> | ||
25 | 26 | ||
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
@@ -102,6 +103,10 @@ static unsigned long imote2_pin_config[] __initdata = { | |||
102 | GPIO96_GPIO, /* accelerometer interrupt */ | 103 | GPIO96_GPIO, /* accelerometer interrupt */ |
103 | GPIO99_GPIO, /* ADC interrupt */ | 104 | GPIO99_GPIO, /* ADC interrupt */ |
104 | 105 | ||
106 | /* SHT15 */ | ||
107 | GPIO100_GPIO, | ||
108 | GPIO98_GPIO, | ||
109 | |||
105 | /* Connector pins specified as gpios */ | 110 | /* Connector pins specified as gpios */ |
106 | GPIO94_GPIO, /* large basic connector pin 14 */ | 111 | GPIO94_GPIO, /* large basic connector pin 14 */ |
107 | GPIO10_GPIO, /* large basic connector pin 23 */ | 112 | GPIO10_GPIO, /* large basic connector pin 23 */ |
@@ -112,6 +117,26 @@ static unsigned long imote2_pin_config[] __initdata = { | |||
112 | GPIO105_GPIO, /* blue led */ | 117 | GPIO105_GPIO, /* blue led */ |
113 | }; | 118 | }; |
114 | 119 | ||
120 | static struct sht15_platform_data platform_data_sht15 = { | ||
121 | .gpio_data = 100, | ||
122 | .gpio_sck = 98, | ||
123 | }; | ||
124 | |||
125 | static struct platform_device sht15 = { | ||
126 | .name = "sht15", | ||
127 | .id = -1, | ||
128 | .dev = { | ||
129 | .platform_data = &platform_data_sht15, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct regulator_consumer_supply imote2_sensor_3_con[] = { | ||
134 | { | ||
135 | .dev = &sht15.dev, | ||
136 | .supply = "vcc", | ||
137 | }, | ||
138 | }; | ||
139 | |||
115 | static struct gpio_led imote2_led_pins[] = { | 140 | static struct gpio_led imote2_led_pins[] = { |
116 | { | 141 | { |
117 | .name = "imote2:red", | 142 | .name = "imote2:red", |
@@ -257,6 +282,8 @@ static struct regulator_init_data imote2_ldo_init_data[] = { | |||
257 | .min_uV = 2800000, | 282 | .min_uV = 2800000, |
258 | .max_uV = 3000000, | 283 | .max_uV = 3000000, |
259 | }, | 284 | }, |
285 | .num_consumer_supplies = ARRAY_SIZE(imote2_sensor_3_con), | ||
286 | .consumer_supplies = imote2_sensor_3_con, | ||
260 | }, | 287 | }, |
261 | [vcc_pxa_pll] = { /* 1.17V - 1.43V, default 1.3V*/ | 288 | [vcc_pxa_pll] = { /* 1.17V - 1.43V, default 1.3V*/ |
262 | .constraints = { | 289 | .constraints = { |
@@ -508,6 +535,7 @@ static struct pxa2xx_udc_mach_info imote2_udc_info __initdata = { | |||
508 | static struct platform_device *imote2_devices[] = { | 535 | static struct platform_device *imote2_devices[] = { |
509 | &imote2_flash_device, | 536 | &imote2_flash_device, |
510 | &imote2_leds, | 537 | &imote2_leds, |
538 | &sht15, | ||
511 | }; | 539 | }; |
512 | 540 | ||
513 | static struct i2c_pxa_platform_data i2c_pwr_pdata = { | 541 | static struct i2c_pxa_platform_data i2c_pwr_pdata = { |