aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/i2c.c
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2010-02-22 15:29:36 -0500
committerTony Lindgren <tony@atomide.com>2010-02-25 17:45:08 -0500
commit9833eff3d7db76d2d04f28567ed8704d69e225ae (patch)
treed28dbe65312a00ad58d733425941dc38e6d4b5f6 /arch/arm/plat-omap/i2c.c
parentb610ec502376d915b76a62e22576c5d0462cc9c9 (diff)
omap: i2c: Fix muxing for command line enabled bus
The commit b63128e81214cc2db2995d690438055c26d213a5 broke the pin muxing for I2C busses that are enabled from the kernel command line. Fix this by defining the board registration function omap_register_i2c_bus in common platform code as it was before but keep the muxing in architecture dependent files. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/i2c.c')
-rw-r--r--arch/arm/plat-omap/i2c.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index 96d2781ac4f5..624e26298faa 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -28,6 +28,7 @@
28#include <linux/i2c.h> 28#include <linux/i2c.h>
29#include <mach/irqs.h> 29#include <mach/irqs.h>
30#include <plat/mux.h> 30#include <plat/mux.h>
31#include <plat/i2c.h>
31 32
32#define OMAP_I2C_SIZE 0x3f 33#define OMAP_I2C_SIZE 0x3f
33#define OMAP1_I2C_BASE 0xfffb3800 34#define OMAP1_I2C_BASE 0xfffb3800
@@ -117,6 +118,11 @@ static int __init omap_i2c_add_bus(int bus_id)
117 res[1].start = irq; 118 res[1].start = irq;
118 } 119 }
119 120
121 if (cpu_class_is_omap1())
122 omap1_i2c_mux_pins(bus_id);
123 if (cpu_class_is_omap2())
124 omap2_i2c_mux_pins(bus_id);
125
120 return platform_device_register(pdev); 126 return platform_device_register(pdev);
121} 127}
122 128
@@ -169,7 +175,7 @@ out:
169subsys_initcall(omap_register_i2c_bus_cmdline); 175subsys_initcall(omap_register_i2c_bus_cmdline);
170 176
171/** 177/**
172 * omap_plat_register_i2c_bus - register I2C bus with device descriptors 178 * omap_register_i2c_bus - register I2C bus with device descriptors
173 * @bus_id: bus id counting from number 1 179 * @bus_id: bus id counting from number 1
174 * @clkrate: clock rate of the bus in kHz 180 * @clkrate: clock rate of the bus in kHz
175 * @info: pointer into I2C device descriptor table or NULL 181 * @info: pointer into I2C device descriptor table or NULL
@@ -177,7 +183,7 @@ subsys_initcall(omap_register_i2c_bus_cmdline);
177 * 183 *
178 * Returns 0 on success or an error code. 184 * Returns 0 on success or an error code.
179 */ 185 */
180int __init omap_plat_register_i2c_bus(int bus_id, u32 clkrate, 186int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
181 struct i2c_board_info const *info, 187 struct i2c_board_info const *info,
182 unsigned len) 188 unsigned len)
183{ 189{