aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/littleton.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/littleton.c')
-rw-r--r--arch/arm/mach-pxa/littleton.c75
1 files changed, 74 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index b4d00aba0e31..31da7f3c06f6 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -20,8 +20,13 @@
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/gpio.h>
23#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
24#include <linux/smc91x.h> 25#include <linux/smc91x.h>
26#include <linux/i2c.h>
27#include <linux/leds.h>
28#include <linux/mfd/da903x.h>
29#include <linux/i2c/max732x.h>
25 30
26#include <asm/types.h> 31#include <asm/types.h>
27#include <asm/setup.h> 32#include <asm/setup.h>
@@ -36,10 +41,10 @@
36 41
37#include <mach/pxa-regs.h> 42#include <mach/pxa-regs.h>
38#include <mach/mfp-pxa300.h> 43#include <mach/mfp-pxa300.h>
39#include <mach/gpio.h>
40#include <mach/pxafb.h> 44#include <mach/pxafb.h>
41#include <mach/ssp.h> 45#include <mach/ssp.h>
42#include <mach/pxa2xx_spi.h> 46#include <mach/pxa2xx_spi.h>
47#include <mach/i2c.h>
43#include <mach/pxa27x_keypad.h> 48#include <mach/pxa27x_keypad.h>
44#include <mach/pxa3xx_nand.h> 49#include <mach/pxa3xx_nand.h>
45#include <mach/littleton.h> 50#include <mach/littleton.h>
@@ -314,6 +319,73 @@ static void __init littleton_init_nand(void)
314static inline void littleton_init_nand(void) {} 319static inline void littleton_init_nand(void) {}
315#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ 320#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
316 321
322#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
323static struct led_info littleton_da9034_leds[] = {
324 [0] = {
325 .name = "littleton:keypad1",
326 .flags = DA9034_LED_RAMP,
327 },
328 [1] = {
329 .name = "littleton:keypad2",
330 .flags = DA9034_LED_RAMP,
331 },
332 [2] = {
333 .name = "littleton:vibra",
334 .flags = 0,
335 },
336};
337
338static struct da903x_subdev_info littleton_da9034_subdevs[] = {
339 {
340 .name = "da903x-led",
341 .id = DA9034_ID_LED_1,
342 .platform_data = &littleton_da9034_leds[0],
343 }, {
344 .name = "da903x-led",
345 .id = DA9034_ID_LED_2,
346 .platform_data = &littleton_da9034_leds[1],
347 }, {
348 .name = "da903x-led",
349 .id = DA9034_ID_VIBRA,
350 .platform_data = &littleton_da9034_leds[2],
351 }, {
352 .name = "da903x-backlight",
353 .id = DA9034_ID_WLED,
354 },
355};
356
357static struct da903x_platform_data littleton_da9034_info = {
358 .num_subdevs = ARRAY_SIZE(littleton_da9034_subdevs),
359 .subdevs = littleton_da9034_subdevs,
360};
361
362static struct max732x_platform_data littleton_max7320_info = {
363 .gpio_base = EXT0_GPIO_BASE,
364};
365
366static struct i2c_board_info littleton_i2c_info[] = {
367 [0] = {
368 .type = "da9034",
369 .addr = 0x34,
370 .platform_data = &littleton_da9034_info,
371 .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO18)),
372 },
373 [1] = {
374 .type = "max7320",
375 .addr = 0x50,
376 .platform_data = &littleton_max7320_info,
377 },
378};
379
380static void __init littleton_init_i2c(void)
381{
382 pxa_set_i2c_info(NULL);
383 i2c_register_board_info(0, ARRAY_AND_SIZE(littleton_i2c_info));
384}
385#else
386static inline void littleton_init_i2c(void) {}
387#endif /* CONFIG_I2C_PXA || CONFIG_I2C_PXA_MODULE */
388
317static void __init littleton_init(void) 389static void __init littleton_init(void)
318{ 390{
319 /* initialize MFP configurations */ 391 /* initialize MFP configurations */
@@ -326,6 +398,7 @@ static void __init littleton_init(void)
326 platform_device_register(&smc91x_device); 398 platform_device_register(&smc91x_device);
327 399
328 littleton_init_spi(); 400 littleton_init_spi();
401 littleton_init_i2c();
329 littleton_init_lcd(); 402 littleton_init_lcd();
330 littleton_init_keypad(); 403 littleton_init_keypad();
331 littleton_init_nand(); 404 littleton_init_nand();