Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

i2c: riic: Allow setting frequencies lower than 50KHz

The MR1.CKS field is 3 bits wide and all the possible values (from 0 to
7) are valid. This is true for all the SoCs currently integrated in
upstream Linux. Take into account CKS=7 which allows setting bus
frequencies lower than 50KHz. This may be useful at least for debugging.

Fixes: d982d6651419 ("i2c: riic: remove clock and frequency restrictions")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

authored by

Claudiu Beznea and committed by
Wolfram Sang
dde9a381 2f6aa0ac

+1 -1
+1 -1
drivers/i2c/busses/i2c-riic.c
··· 386 386 */ 387 387 total_ticks = DIV_ROUND_UP(rate, t->bus_freq_hz ?: 1); 388 388 389 - for (cks = 0; cks < 7; cks++) { 389 + for (cks = 0; cks <= 7; cks++) { 390 390 /* 391 391 * 60% low time must be less than BRL + 2 + 1 392 392 * BRL max register value is 0x1F.