aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533
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-bf533
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-bf533')
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c32
1 files changed, 32 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
479static 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
477static struct platform_device *stamp_devices[] __initdata = { 503static 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;