aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorClaudiu Beznea <[email protected]>2025-09-23 14:18:26 +0000
committerWolfram Sang <[email protected]>2025-09-23 19:14:53 +0000
commitdde9a38195b0c268ff55d3a8aa62faefd0e988c8 (patch)
treec4d274c9a80ec5de20e4354a2cb48dd661664f45 /drivers/i2c
parentMAINTAINERS: Remove myself as Synopsys DesignWare I2C maintainer (diff)
downloadkernel-dde9a38195b0c268ff55d3a8aa62faefd0e988c8.tar.gz
kernel-dde9a38195b0c268ff55d3a8aa62faefd0e988c8.zip
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 <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-riic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index 9c164a4b9bb9..b0ee9ac45a97 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -386,7 +386,7 @@ static int riic_init_hw(struct riic_dev *riic)
*/
total_ticks = DIV_ROUND_UP(rate, t->bus_freq_hz ?: 1);
- for (cks = 0; cks < 7; cks++) {
+ for (cks = 0; cks <= 7; cks++) {
/*
* 60% low time must be less than BRL + 2 + 1
* BRL max register value is 0x1F.