Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184829
b: refs/heads/master
c: 9833eff
h: refs/heads/master
i:
  184827: e0ed54b
v: v3
  • Loading branch information
Jarkko Nikula authored and Tony Lindgren committed Feb 25, 2010
1 parent 70b08a6 commit 1639ab7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b610ec502376d915b76a62e22576c5d0462cc9c9
refs/heads/master: 9833eff3d7db76d2d04f28567ed8704d69e225ae
6 changes: 1 addition & 5 deletions trunk/arch/arm/mach-omap1/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
#include <plat/mux.h>
#include <plat/cpu.h>

int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
struct i2c_board_info const *info,
unsigned len)
void __init omap1_i2c_mux_pins(int bus_id)
{
if (cpu_is_omap7xx()) {
omap_cfg_reg(I2C_7XX_SDA);
Expand All @@ -34,6 +32,4 @@ int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
omap_cfg_reg(I2C_SDA);
omap_cfg_reg(I2C_SCL);
}

return omap_plat_register_i2c_bus(bus_id, clkrate, info, len);
}
6 changes: 1 addition & 5 deletions trunk/arch/arm/mach-omap2/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@

#include "mux.h"

int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
struct i2c_board_info const *info,
unsigned len)
void __init omap2_i2c_mux_pins(int bus_id)
{
if (cpu_is_omap24xx()) {
const int omap24xx_pins[][2] = {
Expand All @@ -51,6 +49,4 @@ int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id);
omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
}

return omap_plat_register_i2c_bus(bus_id, clkrate, info, len);
}
10 changes: 8 additions & 2 deletions trunk/arch/arm/plat-omap/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/i2c.h>
#include <mach/irqs.h>
#include <plat/mux.h>
#include <plat/i2c.h>

#define OMAP_I2C_SIZE 0x3f
#define OMAP1_I2C_BASE 0xfffb3800
Expand Down Expand Up @@ -117,6 +118,11 @@ static int __init omap_i2c_add_bus(int bus_id)
res[1].start = irq;
}

if (cpu_class_is_omap1())
omap1_i2c_mux_pins(bus_id);
if (cpu_class_is_omap2())
omap2_i2c_mux_pins(bus_id);

return platform_device_register(pdev);
}

Expand Down Expand Up @@ -169,15 +175,15 @@ static int __init omap_register_i2c_bus_cmdline(void)
subsys_initcall(omap_register_i2c_bus_cmdline);

/**
* omap_plat_register_i2c_bus - register I2C bus with device descriptors
* omap_register_i2c_bus - register I2C bus with device descriptors
* @bus_id: bus id counting from number 1
* @clkrate: clock rate of the bus in kHz
* @info: pointer into I2C device descriptor table or NULL
* @len: number of descriptors in the table
*
* Returns 0 on success or an error code.
*/
int __init omap_plat_register_i2c_bus(int bus_id, u32 clkrate,
int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
struct i2c_board_info const *info,
unsigned len)
{
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/arm/plat-omap/include/plat/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
}
#endif

int omap_plat_register_i2c_bus(int bus_id, u32 clkrate,
struct i2c_board_info const *info,
unsigned len);
void __init omap1_i2c_mux_pins(int bus_id);
void __init omap2_i2c_mux_pins(int bus_id);

0 comments on commit 1639ab7

Please sign in to comment.