]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: img-scb: fix LOW and HIGH period values for the SCL clock
authorSifan Naeem <sifan.naeem@imgtec.com>
Thu, 10 Sep 2015 14:50:04 +0000 (15:50 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 10 Oct 2015 07:38:55 +0000 (08:38 +0100)
commit7c09389695ec276f422d891c690393253df2f518
tree4bb4e359ff3bbbd2708f049fdc6d68b0a81f04c8
parent322a95d54be9d75cba492f08fde047cfdbc40efe
i2c: img-scb: fix LOW and HIGH period values for the SCL clock

Currently, after determining the minimum value for the High period
(TCKH) the remainder of the internal clock pulses is set as the Low
period (TCKL). This causes the i2c clock duty cycle to be much less
than 50%.

Modify the starting position to TCKH and TCKL at 50% of the internal
clock, and adjusts the TCKH and TCKL values from there should the
minimum value for TCKL not be met. This results in duty cycles closer
to 50%.

Fixes: commit 868b09c46ef8 ("i2c: img-scb: Add Imagination Technologies I2C SCB driver")
Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: James Hartley <james.hartley@imgtec.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-img-scb.c