I2C driver support baud rate parameter

Issues related to applications and software problems
Post Reply
LordHog
Posts: 5
Joined: 2014/05/23 00:32:16

I2C driver support baud rate parameter

Post by LordHog » 2015/05/19 00:00:41

Hello all,

I have several test machines running CentOS release 6.5 (Final) and we are using Python 3.3 using the SMBus package to communicate over the SMBus (e.g., I2C). We are using the i2c-dev module. The problem we are having is the driver is hard coded to 400 kHz and I have found no way to change the baud rate under the /sys/module/i2c_dev directory. I have used something similar to change the I2C baud rate on the Raspberry Pi (i.e.,/sys/module/i2c_bcm2708/parameters/baudrate).

So my question is, is there a way to change the baud rate of the i2c_dev module/driver without having to recompile the kernel? If I need to recompile the kernel, how can I add this configuration item so I can change the baud rate by using something similar to what the Raspberry Pi has? Any help is greatly appreciated.

Regards,
Mark

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: I2C driver support baud rate parameter

Post by gerald_clark » 2015/05/19 00:10:58

You are running an unsupported kernel, an unsupported python, and you want to use an unsupported baud rate on i2c?
How about updating to a supported 6.6, using a supported python, and explaining why you would want to yank i2c out from under
all the cujrrent modules.

LordHog
Posts: 5
Joined: 2014/05/23 00:32:16

Re: I2C driver support baud rate parameter

Post by LordHog » 2015/05/19 00:33:33

Mr. gerald_clark,

Thanks for you response, though it hasn't help me much so far. I want to use 100 kHz, which is the supported SMBus baud rate as well as one of the three I2C supported baud rates. I am not sure how I am "yanking i2c from under all the current modules".

Regards,
Mark

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: I2C driver support baud rate parameter

Post by gerald_clark » 2015/05/19 00:42:29

Again, why do you want to change the baud rate?
This kind of question is often due to assuming the wrong answer to another question.

LordHog
Posts: 5
Joined: 2014/05/23 00:32:16

Re: I2C driver support baud rate parameter

Post by LordHog » 2015/05/19 00:53:10

Mr. gerald_clark,

I have a product that is communicating over the PCIe SMBus that is only able to communicate at 100 kHz and is unable to support 400 kHz. I am not just trying to change the bit rate (sorry, baud rate is the wrong term that I used before) on a whim.

Regards,
Mark

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: I2C driver support baud rate parameter

Post by gerald_clark » 2015/05/19 02:10:52

Well, CentOS does not ship python 3.3 nor any of its modules.
Did you check out boot time options?
https://www.kernel.org/doc/Documentatio ... meters.txt
look for i2c_bus=

LordHog
Posts: 5
Joined: 2014/05/23 00:32:16

Re: I2C driver support baud rate parameter

Post by LordHog » 2015/05/19 02:16:18

Mr. gerald_clark,

I am failing to see how which version Python is figuring into the equation. Python 3.3 is not part of the "official" CentOS v6.5 package, but does that mean I can't install it and use it? I guess I am just failing to see adding any program (application, development, or utility) means it might not work. If I was unable to install anything else other than what came with the original package, it would be as beneficial over the course of time.

Huge thanks for boot time option. I did not know about these and will give it a try. Hopefully it will help out. Thanks!

Regards,
Mark

Post Reply