Commit fdddcd2
authored
I2C: Allow exact frequency matches (OpenDevicePartnership#504)
41f9d4d made a change to filter out
configurations that had a duty cycle of exactly the target frequency in
an attempt to add a little buffer so that jitter wouldn't cause
overshoot of the target frequency. This works at a duty cycle of 50%
where there exists a (high_clocks, low_clocks, clock_div) tuple that
satisfies this due to rounding error, e.g. (9, 9, 7) => 380952. However,
this had the unintended side-effect of causing any duty cycles that do
not incur rounding error at any point to be rejected - i.e. it's
impossible to configure a 40% duty cycle at 100kHz because the
candidates all divide cleanly.
This change reverts to allowing direct matches to enable these duty
cycles. Clients that need strict compliance can use strict_mode: true to
achieve it.1 parent 4cd1854 commit fdddcd2
1 file changed
+1
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 132 | + | |
140 | 133 | | |
141 | 134 | | |
142 | 135 | | |
| |||
0 commit comments