Skip to contentSkip to conversation

sh: fix i2c init order on Migo-R

PATCH Applied Magnus Damm 2 participants 3 messages Aug 6, 2009 – Aug 13, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: fix i2c init order on Migo-R

From: Magnus Damm <[email protected]>

Convert the Migo-R board code to register i2c devices from arch_initcall() instead of __initcall(). This fix unbreaks migor_ts touch screen driver support.

---

Suitable for 2.6.31-rc.

 arch/sh/boards/mach-migor/setup.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
arch/sh/boards/mach-migor/setup.c +9 -3
@@ -405,6 +405,15 @@ static struct i2c_board_info migor_i2c_d
 	},
 };
 
+static int __init migor_devices_i2c_setup(void)
+{
+	i2c_register_board_info(0, migor_i2c_devices,
+				ARRAY_SIZE(migor_i2c_devices));
+
+	return 0;
+}
+arch_initcall(migor_devices_i2c_setup);
+
 static struct i2c_board_info migor_i2c_camera[] = {
 	{
 		I2C_BOARD_INFO("ov772x", 0x21),
@@ -600,9 +609,6 @@ static int __init migor_devices_setup(vo
 
 	platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20);
 
-	i2c_register_board_info(0, migor_i2c_devices,
-				ARRAY_SIZE(migor_i2c_devices));
-
 	spi_register_board_info(migor_spi_devices,
 				ARRAY_SIZE(migor_spi_devices));
 
#1 lore raw

PATCH 1/1 sh: fix i2c init order on Migo-R V2

From: Magnus Damm <[email protected]>

Convert the Migo-R board code to register devices at arch_initcall() time instead of __initcall(). This fix unbreaks migor_ts touch screen driver support.

---

Suitable for 2.6.31-rc.

 arch/sh/boards/mach-migor/setup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/boards/mach-migor/setup.c +1 -1
@@ -608,7 +608,7 @@ static int __init migor_devices_setup(vo
 
 	return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
 }
-__initcall(migor_devices_setup);
+arch_initcall(migor_devices_setup);
 
 /* Return the board specific boot mode pin configuration */
 static int migor_mode_pins(void)
Applied
#2 lore raw

Re: [PATCH] sh: fix i2c init order on Migo-R V2

In reply to Magnus Damm
Quoted 3 lines · Magnus Damm

Convert the Migo-R board code to register devices at arch_initcall() time instead of __initcall(). This fix unbreaks migor_ts touch screen driver support.

Quoted 3 lines · Magnus Damm

Convert the AP325RXA board code to register devices at arch_initcall() time instead of device_initcall(). This fix unbreaks pcf8563 RTC driver support.

Applied to 2.6.31 queue, thanks.