diff options
author | David Brownell <david-b@pacbell.net> | 2007-10-13 17:56:30 -0400 |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2007-10-13 17:56:30 -0400 |
commit | 8056c6cb2bb1632aa9221dce0e43a61db37b420f (patch) | |
tree | 4ca321bba9db87c80c77f841c9a52c456be63aa5 /arch/arm/mach-omap1/board-h3.c | |
parent | b5067f8ff37ed6cfa024170a9819bb09d55e9c1f (diff) |
i2c/tps65010: New-style driver updates, part 2
Switch the tps65010 driver into a "new-style" I2C driver, and convert all
of its in-tree users (board support for OSK, H2, H3) accordingly.
That accounts for most of the board-specific code in this driver; the
rest of that code is now moved into board-specific initcalls.
Also remove some of the many now-superfluous #includes.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'arch/arm/mach-omap1/board-h3.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 79d4ef4c54d4..add2f703204f 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
24 | #include <linux/i2c.h> | ||
24 | #include <linux/mtd/mtd.h> | 25 | #include <linux/mtd/mtd.h> |
25 | #include <linux/mtd/nand.h> | 26 | #include <linux/mtd/nand.h> |
26 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
@@ -29,12 +30,14 @@ | |||
29 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
30 | #include <asm/page.h> | 31 | #include <asm/page.h> |
31 | #include <asm/hardware.h> | 32 | #include <asm/hardware.h> |
33 | #include <asm/gpio.h> | ||
34 | |||
32 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/flash.h> | 37 | #include <asm/mach/flash.h> |
35 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
36 | 39 | ||
37 | #include <asm/arch/gpio.h> | 40 | #include <asm/arch/tps65010.h> |
38 | #include <asm/arch/gpioexpander.h> | 41 | #include <asm/arch/gpioexpander.h> |
39 | #include <asm/arch/irqs.h> | 42 | #include <asm/arch/irqs.h> |
40 | #include <asm/arch/mux.h> | 43 | #include <asm/arch/mux.h> |
@@ -413,6 +416,19 @@ static struct omap_board_config_kernel h3_config[] = { | |||
413 | { OMAP_TAG_LCD, &h3_lcd_config }, | 416 | { OMAP_TAG_LCD, &h3_lcd_config }, |
414 | }; | 417 | }; |
415 | 418 | ||
419 | static struct i2c_board_info __initdata h3_i2c_board_info[] = { | ||
420 | { | ||
421 | I2C_BOARD_INFO("tps65010", 0x48), | ||
422 | .type = "tps65013", | ||
423 | /* .irq = OMAP_GPIO_IRQ(??), */ | ||
424 | }, | ||
425 | /* TODO when driver support is ready: | ||
426 | * - isp1301 OTG transceiver | ||
427 | * - optional ov9640 camera sensor at 0x30 | ||
428 | * - ... | ||
429 | */ | ||
430 | }; | ||
431 | |||
416 | #define H3_NAND_RB_GPIO_PIN 10 | 432 | #define H3_NAND_RB_GPIO_PIN 10 |
417 | 433 | ||
418 | static int nand_dev_ready(struct nand_platform_data *data) | 434 | static int nand_dev_ready(struct nand_platform_data *data) |
@@ -446,6 +462,10 @@ static void __init h3_init(void) | |||
446 | omap_board_config = h3_config; | 462 | omap_board_config = h3_config; |
447 | omap_board_config_size = ARRAY_SIZE(h3_config); | 463 | omap_board_config_size = ARRAY_SIZE(h3_config); |
448 | omap_serial_init(); | 464 | omap_serial_init(); |
465 | |||
466 | /* FIXME setup irq for tps65013 chip */ | ||
467 | i2c_register_board_info(1, h3_i2c_board_info, | ||
468 | ARRAY_SIZE(h3_i2c_board_info)); | ||
449 | } | 469 | } |
450 | 470 | ||
451 | static void __init h3_init_smc91x(void) | 471 | static void __init h3_init_smc91x(void) |
@@ -470,6 +490,23 @@ static void __init h3_map_io(void) | |||
470 | omap1_map_common_io(); | 490 | omap1_map_common_io(); |
471 | } | 491 | } |
472 | 492 | ||
493 | #ifdef CONFIG_TPS65010 | ||
494 | static int __init h3_tps_init(void) | ||
495 | { | ||
496 | if (!machine_is_omap_h3()) | ||
497 | return 0; | ||
498 | |||
499 | /* gpio4 for SD, gpio3 for VDD_DSP */ | ||
500 | /* FIXME send power to DSP iff it's configured */ | ||
501 | |||
502 | /* Enable LOW_PWR */ | ||
503 | tps65013_set_low_pwr(ON); | ||
504 | |||
505 | return 0; | ||
506 | } | ||
507 | fs_initcall(h3_tps_init); | ||
508 | #endif | ||
509 | |||
473 | MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") | 510 | MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") |
474 | /* Maintainer: Texas Instruments, Inc. */ | 511 | /* Maintainer: Texas Instruments, Inc. */ |
475 | .phys_io = 0xfff00000, | 512 | .phys_io = 0xfff00000, |