Skip to contentSkip to conversation

i2c: Initialise Samsung I2C controller early

PATCH In review Mark Brown 2 participants 3 messages Feb 26, 2009 – Mar 31, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 i2c: Initialise Samsung I2C controller early

This is required in order to ensure that core system devices such as voltage regulators attached via I2C are avaiable early in boot.

---
 drivers/i2c/busses/i2c-s3c2410.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-s3c2410.c +1 -2
index 5b7f956..91f6a1e 100644
@@ -1018,14 +1018,13 @@ static int __init i2c_adap_s3c_init(void)
 
 	return ret;
 }
+subsys_initcall(i2c_adap_s3c_init);
 
 static void __exit i2c_adap_s3c_exit(void)
 {
 	platform_driver_unregister(&s3c2410_i2c_driver);
 	platform_driver_unregister(&s3c2440_i2c_driver);
 }
-
-module_init(i2c_adap_s3c_init);
 module_exit(i2c_adap_s3c_exit);
 
 MODULE_DESCRIPTION("S3C24XX I2C Bus driver");
Signature · 1 line
1.6.1.3

A message that is not in the archive (sent off-list or not yet received): 1235665762-20400-1-git-send-email-broonie-yzvPICuk2AATkU/[email protected]

#2 lore raw
Quoted 2 lines · Mark Brown

This is required in order to ensure that core system devices such as voltage regulators attached via I2C are avaiable early in boot.

Ok, will try and test soon and add to my -next tree.

Quoted 32 lines
---
 drivers/i2c/busses/i2c-s3c2410.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-s3c2410.c +1 -2
index 5b7f956..91f6a1e 100644
@@ -1018,14 +1018,13 @@ static int __init i2c_adap_s3c_init(void)
 
 	return ret;
 }
+subsys_initcall(i2c_adap_s3c_init);
 
 static void __exit i2c_adap_s3c_exit(void)
 {
 	platform_driver_unregister(&s3c2410_i2c_driver);
 	platform_driver_unregister(&s3c2440_i2c_driver);
 }
-
-module_init(i2c_adap_s3c_init);
 module_exit(i2c_adap_s3c_exit);
 
 MODULE_DESCRIPTION("S3C24XX I2C Bus driver");
Signature · 6 lines
1.6.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
#3 lore raw
In reply to a message not in the archive
Quoted 2 lines · Mark Brown

This is required in order to ensure that core system devices such as voltage regulators attached via I2C are avaiable early in boot.

applied, subsys_initcall works for modules as well as builtin code.

Quoted 32 lines
---
 drivers/i2c/busses/i2c-s3c2410.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-s3c2410.c +1 -2
index 5b7f956..91f6a1e 100644
@@ -1018,14 +1018,13 @@ static int __init i2c_adap_s3c_init(void)
 
 	return ret;
 }
+subsys_initcall(i2c_adap_s3c_init);
 
 static void __exit i2c_adap_s3c_exit(void)
 {
 	platform_driver_unregister(&s3c2410_i2c_driver);
 	platform_driver_unregister(&s3c2440_i2c_driver);
 }
-
-module_init(i2c_adap_s3c_init);
 module_exit(i2c_adap_s3c_exit);
 
 MODULE_DESCRIPTION("S3C24XX I2C Bus driver");
Signature · 6 lines
1.6.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'