From 50c4c0861a0a60cd4f414457fdbfc8d9a1eb1e31 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Tue, 22 Sep 2009 13:10:09 +0000 Subject: Blackfin: convert adv7393 resources to new i2c framework Now that the driver has been updated, convert the board resources to the new i2c framework for managing slaves. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- arch/blackfin/mach-bf533/boards/ezkit.c | 21 +++++++++++---------- arch/blackfin/mach-bf533/boards/stamp.c | 15 +++++---------- 2 files changed, 16 insertions(+), 20 deletions(-) (limited to 'arch/blackfin/mach-bf533') diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 64816b08d13c..9ffcd63442f1 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c @@ -17,6 +17,7 @@ #include #endif #include +#include #include #include #include @@ -34,12 +35,6 @@ static struct platform_device rtc_device = { }; #endif -#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) -static struct platform_device bfin_fb_adv7393_device = { - .name = "bfin-adv7393", -}; -#endif - /* * USB-LAN EzExtender board * Driver needs to know address, irq and flag pin. @@ -438,6 +433,14 @@ static struct platform_device bfin_dpmc = { }, }; +static struct i2c_board_info __initdata bfin_i2c_board_info[] = { +#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) + { + I2C_BOARD_INFO("bfin-adv7393", 0x2B), + }, +#endif +}; + static struct platform_device *ezkit_devices[] __initdata = { &bfin_dpmc, @@ -460,10 +463,6 @@ static struct platform_device *ezkit_devices[] __initdata = { &bfin_spi0_device, #endif -#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) - &bfin_fb_adv7393_device, -#endif - #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) &rtc_device, #endif @@ -494,6 +493,8 @@ static int __init ezkit_init(void) printk(KERN_INFO "%s(): registering device resources\n", __func__); platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); + i2c_register_board_info(0, bfin_i2c_board_info, + ARRAY_SIZE(bfin_i2c_board_info)); return 0; } diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 1a995d18349e..ff1fd938442f 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c @@ -73,12 +73,6 @@ static struct platform_device smc91x_device = { }; #endif -#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) -static struct platform_device bfin_fb_adv7393_device = { - .name = "bfin-adv7393", -}; -#endif - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) static struct resource net2272_bfin_resources[] = { { @@ -465,6 +459,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { .irq = 39, }, #endif +#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) + { + I2C_BOARD_INFO("bfin-adv7393", 0x2B), + }, +#endif }; static const unsigned int cclk_vlev_datasheet[] = @@ -506,10 +505,6 @@ static struct platform_device *stamp_devices[] __initdata = { &smc91x_device, #endif -#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) - &bfin_fb_adv7393_device, -#endif - #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) &net2272_bfin_device, #endif -- cgit