aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537/boards/stamp.c
diff options
context:
space:
mode:
authorBryan Wu <cooloney@kernel.org>2008-03-25 22:02:13 -0400
committerBryan Wu <cooloney@kernel.org>2008-03-25 22:02:13 -0400
commit81d9c7f27dd679df6d03df53eba4fd12caafdb47 (patch)
tree601081d297b20657e84a6b3bbad8e2e38997d11a /arch/blackfin/mach-bf537/boards/stamp.c
parentd171c23327e2d596ac27d3df4322fc6430b45aa2 (diff)
[Blackfin] arch: add i2c board info struct and move to new-style i2c interface
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-bf537/boards/stamp.c')
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c33
1 files changed, 33 insertions, 0 deletions
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
705static 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)
704static struct platform_device bfin_sport0_uart_device = { 730static 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 = {
829static int __init stamp_init(void) 855static 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