Want to change the i2c bus frequency from other drivers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Want to change the i2c bus frequency from other drivers

1,550 Views
titusstalin
Contributor V

Dear All,

I have iMx6 Nitrogen board and Linux kernel version is 3.14.

I want to change the i2c bus frequency from other drivers.

Also need to get the i2c bus clock frequency from other drivers.

Can I export the symbol of "i2c_imx_set_clk" and use ?

Any other ideas ?

Thanks for the support.

Regards,

Titus S.

Labels (2)
0 Kudos
3 Replies

781 Views
igorpadykov
NXP Employee
NXP Employee

Hi Titus

one can look at entry in i2c1 in imx6q-sabrelite.dts

clock-frequency = <100000>

linux-2.6-imx.git - Freescale i.MX Linux Tree

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

781 Views
titusstalin
Contributor V

Thank you.

But I need to get the bitrate (i2c bus clock) from other driver say for example Ethernet driver.

Yes, I can change the i2c bus clock in dts file but after boot, need to check what is the i2c frequency ?

Also I want to change/modify the i2c clock (to 400KHz) in run time after boot from other drivers.

I am expecting to use "i2c_imx_set_clk" API to change it but need to know how ?

0 Kudos

781 Views
igorpadykov
NXP Employee
NXP Employee

I am afraid changing bitrate dynamically is not supported in linux.

For procedure of changing bitrate please check reference manual i2c chapter.

~igor

0 Kudos