diff options
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 32 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 33 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 34 |
3 files changed, 99 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index ecf449b322d9..32b37afc6e6a 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #endif | 40 | #endif |
41 | #include <linux/ata_platform.h> | 41 | #include <linux/ata_platform.h> |
42 | #include <linux/irq.h> | 42 | #include <linux/irq.h> |
43 | #include <linux/i2c.h> | ||
43 | #include <asm/dma.h> | 44 | #include <asm/dma.h> |
44 | #include <asm/bfin5xx_spi.h> | 45 | #include <asm/bfin5xx_spi.h> |
45 | #include <asm/reboot.h> | 46 | #include <asm/reboot.h> |
@@ -474,6 +475,31 @@ static struct platform_device i2c_gpio_device = { | |||
474 | }; | 475 | }; |
475 | #endif | 476 | #endif |
476 | 477 | ||
478 | #ifdef CONFIG_I2C_BOARDINFO | ||
479 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | ||
480 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) | ||
481 | { | ||
482 | I2C_BOARD_INFO("ad7142_joystick", 0x2C), | ||
483 | .type = "ad7142_joystick", | ||
484 | .irq = 39, | ||
485 | }, | ||
486 | #endif | ||
487 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | ||
488 | { | ||
489 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | ||
490 | .type = "pcf8574_lcd", | ||
491 | }, | ||
492 | #endif | ||
493 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) | ||
494 | { | ||
495 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), | ||
496 | .type = "pcf8574_keypad", | ||
497 | .irq = 39, | ||
498 | }, | ||
499 | #endif | ||
500 | }; | ||
501 | #endif | ||
502 | |||
477 | static struct platform_device *stamp_devices[] __initdata = { | 503 | static struct platform_device *stamp_devices[] __initdata = { |
478 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 504 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
479 | &rtc_device, | 505 | &rtc_device, |
@@ -528,6 +554,12 @@ static int __init stamp_init(void) | |||
528 | int ret; | 554 | int ret; |
529 | 555 | ||
530 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); | 556 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); |
557 | |||
558 | #ifdef CONFIG_I2C_BOARDINFO | ||
559 | i2c_register_board_info(0, bfin_i2c_board_info, | ||
560 | ARRAY_SIZE(bfin_i2c_board_info)); | ||
561 | #endif | ||
562 | |||
531 | ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 563 | ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
532 | if (ret < 0) | 564 | if (ret < 0) |
533 | return ret; | 565 | return ret; |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 09828a0e999c..f81a9b8a640e 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/ata_platform.h> | 41 | #include <linux/ata_platform.h> |
42 | #include <linux/irq.h> | 42 | #include <linux/irq.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/i2c.h> | ||
44 | #include <linux/usb/sl811.h> | 45 | #include <linux/usb/sl811.h> |
45 | #include <asm/dma.h> | 46 | #include <asm/dma.h> |
46 | #include <asm/bfin5xx_spi.h> | 47 | #include <asm/bfin5xx_spi.h> |
@@ -700,6 +701,31 @@ static struct platform_device i2c_bfin_twi_device = { | |||
700 | }; | 701 | }; |
701 | #endif | 702 | #endif |
702 | 703 | ||
704 | #ifdef CONFIG_I2C_BOARDINFO | ||
705 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | ||
706 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) | ||
707 | { | ||
708 | I2C_BOARD_INFO("ad7142_joystick", 0x2C), | ||
709 | .type = "ad7142_joystick", | ||
710 | .irq = 55, | ||
711 | }, | ||
712 | #endif | ||
713 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | ||
714 | { | ||
715 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | ||
716 | .type = "pcf8574_lcd", | ||
717 | }, | ||
718 | #endif | ||
719 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) | ||
720 | { | ||
721 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), | ||
722 | .type = "pcf8574_keypad", | ||
723 | .irq = 72, | ||
724 | }, | ||
725 | #endif | ||
726 | }; | ||
727 | #endif | ||
728 | |||
703 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 729 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
704 | static struct platform_device bfin_sport0_uart_device = { | 730 | static struct platform_device bfin_sport0_uart_device = { |
705 | .name = "bfin-sport-uart", | 731 | .name = "bfin-sport-uart", |
@@ -829,6 +855,12 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
829 | static int __init stamp_init(void) | 855 | static int __init stamp_init(void) |
830 | { | 856 | { |
831 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); | 857 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); |
858 | |||
859 | #ifdef CONFIG_I2C_BOARDINFO | ||
860 | i2c_register_board_info(0, bfin_i2c_board_info, | ||
861 | ARRAY_SIZE(bfin_i2c_board_info)); | ||
862 | #endif | ||
863 | |||
832 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 864 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
833 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 865 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
834 | spi_register_board_info(bfin_spi_board_info, | 866 | spi_register_board_info(bfin_spi_board_info, |
@@ -838,6 +870,7 @@ static int __init stamp_init(void) | |||
838 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 870 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
839 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 871 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |
840 | #endif | 872 | #endif |
873 | |||
841 | return 0; | 874 | return 0; |
842 | } | 875 | } |
843 | 876 | ||
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index dc3c0156f37f..04c0c8df6e96 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
37 | #include <linux/spi/flash.h> | 37 | #include <linux/spi/flash.h> |
38 | #include <linux/irq.h> | 38 | #include <linux/irq.h> |
39 | #include <linux/i2c.h> | ||
39 | #include <linux/interrupt.h> | 40 | #include <linux/interrupt.h> |
40 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | 41 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) |
41 | #include <linux/usb/musb.h> | 42 | #include <linux/usb/musb.h> |
@@ -573,6 +574,29 @@ static struct platform_device i2c_bfin_twi1_device = { | |||
573 | #endif | 574 | #endif |
574 | #endif | 575 | #endif |
575 | 576 | ||
577 | #ifdef CONFIG_I2C_BOARDINFO | ||
578 | static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { | ||
579 | }; | ||
580 | |||
581 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ | ||
582 | static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { | ||
583 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | ||
584 | { | ||
585 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | ||
586 | .type = "pcf8574_lcd", | ||
587 | }, | ||
588 | #endif | ||
589 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) | ||
590 | { | ||
591 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), | ||
592 | .type = "pcf8574_keypad", | ||
593 | .irq = 212, | ||
594 | }, | ||
595 | #endif | ||
596 | }; | ||
597 | #endif | ||
598 | #endif | ||
599 | |||
576 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 600 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
577 | #include <linux/gpio_keys.h> | 601 | #include <linux/gpio_keys.h> |
578 | 602 | ||
@@ -672,6 +696,16 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
672 | static int __init ezkit_init(void) | 696 | static int __init ezkit_init(void) |
673 | { | 697 | { |
674 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); | 698 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); |
699 | |||
700 | #ifdef CONFIG_I2C_BOARDINFO | ||
701 | i2c_register_board_info(0, bfin_i2c_board_info0, | ||
702 | ARRAY_SIZE(bfin_i2c_board_info0)); | ||
703 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ | ||
704 | i2c_register_board_info(1, bfin_i2c_board_info1, | ||
705 | ARRAY_SIZE(bfin_i2c_board_info1)); | ||
706 | #endif | ||
707 | #endif | ||
708 | |||
675 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); | 709 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
676 | 710 | ||
677 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 711 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |