kernel: i2c-stm.c - change I2C communication rate (speedup)
This commit is contained in:
parent
e9b0aad3a3
commit
7634ebccd6
@ -1044,6 +1044,10 @@ static void iic_stm_setup_timing(struct iic_ssc *adap)
|
|||||||
|
|
||||||
clock = clk_get_rate(adap->clk) + 500000; /* +0.5 Mhz for rounding */
|
clock = clk_get_rate(adap->clk) + 500000; /* +0.5 Mhz for rounding */
|
||||||
ns_per_clk = NANOSEC_PER_SEC / clock;
|
ns_per_clk = NANOSEC_PER_SEC / clock;
|
||||||
|
printk("stm i2c clock = %lu, ns_per_clk = %lu\n", clock, ns_per_clk);
|
||||||
|
clock = clock / 2;
|
||||||
|
ns_per_clk = NANOSEC_PER_SEC / clock;
|
||||||
|
printk("stm i2c modified clock = %lu, ns_per_clk = %lu\n", clock, ns_per_clk);
|
||||||
|
|
||||||
if (check_fastmode(adap)) {
|
if (check_fastmode(adap)) {
|
||||||
set_ready_fastmode(adap);
|
set_ready_fastmode(adap);
|
||||||
|
Loading…
Reference in New Issue
Block a user