ARM: OMAP: Add command line option for I2C bus speed
Subsystems (3)
cover ARM: OMAP: Add command line option for I2C bus speed
Hi
Tony, I added kernel-parameters.txt change to the patches 2 and 3. Otherwise set is the same than currently in linux-omap. Set is generated on top of mainline version 2.6.29-rc7. Earlier discussion was
http://marc.info/?l=linux-omap&m=123635604511892&w=2
Signature · 1 line
Jarkko
PATCH 1/3 ARM: OMAP: Add documentation for function omap_register_i2c_bus
--- arch/arm/plat-omap/i2c.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/plat-omap/i2c.c +9 -0
@@ -119,6 +119,15 @@ static void __init omap_i2c_mux_pins(int bus)omap_cfg_reg (scl); } +/** +* 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_register_i2c_bus (int bus_id,u32 clkrate,struct i2c_board_info const *info,unsigned len)
Signature · 1 line
1.6.1.3
PATCH 2/3 ARM: OMAP: Add command line option for I2C bus speed
In reply to Jarkko NikulaThis patch adds a new command line option "i2c_bus=bus_id,clkrate" into I2C bus registration helper. Purpose of the option is to override the default board specific bus speed which is supplied by the omap_register_i2c_bus.
The default bus speed is typically set to speed of slowest I2C chip on the bus and overriding allow to use some experimental configurations or updated chip versions without any kernel modifications.
--- Documentation/kernel-parameters.txt | 4 ++ arch/arm/plat-omap/i2c.c | 54 ++++++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 10 deletions(-)
Documentation/kernel-parameters.txt +4 -0
@@ -830,6 +830,10 @@ and is between 256 and 4096 characters. It is defined in the file hvc_iucv= [S390] Number of z/VM IUCV hypervisor console (HVC) terminal devices. Valid values: 0..8 + i2c_bus= [HW] Override the default board specific I2C bus speed + Format: + <bus_id>,<clkrate> + i8042.debug [HW] Toggle i8042 debug mode i8042.direct [HW] Put keyboard port into non-translated mode i8042.dumbkbd [HW] Pretend that controller can only read data from
arch/arm/plat-omap/i2c.c +44 -10
76 lines not on this page · raw message
Signature · 1 line
1.6.1.3
PATCH 3/3 ARM: OMAP: Add method to register additional I2C busses on the command line
In reply to Jarkko NikulaThis patch extends command line option "i2c_bus=bus_id,clkrate" so that it allow to register additional I2C busses that are not registered with omap_register_i2c_bus from board initialization code.
Purpose of this is to register additional board busses which are routed to external connectors only without any on board I2C devices.
--- Documentation/kernel-parameters.txt | 2 + arch/arm/plat-omap/i2c.c | 73 +++++++++++++++++++++++++---------- 2 files changed, 54 insertions(+), 21 deletions(-)
Documentation/kernel-parameters.txt +2 -0
@@ -831,6 +831,8 @@ and is between 256 and 4096 characters. It is defined in the file terminal devices. Valid values: 0..8 i2c_bus= [HW] Override the default board specific I2C bus speed + or register an additional I2C bus that is not + registered from board initialization code. Format: <bus_id>,<clkrate>
arch/arm/plat-omap/i2c.c +52 -21
108 lines not on this page · raw message
Signature · 1 line
1.6.1.3
Quoted 7 lines · Jarkko Nikula
Hi
Tony, I added kernel-parameters.txt change to the patches 2 and 3. Otherwise set is the same than currently in linux-omap. Set is generated on top of mainline version 2.6.29-rc7. Earlier discussion was
Thanks, they look OK to me. Can you please reply to that earlier thread with these updated patches, and add [email protected] to Cc? Then the I2C people can give their comments on the cmdline option.
Regards,
Tony