You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iio: adc: ltc2387: Specify PWM parameters in nanoseconds
With the reference clock running at less than 1 GHz two different
settings for the used PWM differ by more than 1 ns. So there is no
advantage to differ from the upstream pwm subsystem and give the
illusion of pico second resolution.
With the goal to drop support for time_unit, don't explicitly set
.time_unit = PWM_UNIT_NSEC but rely on this being the default.
Also improve precision in the period calculation by not multiplying the
result of two divisions but a single (reduced) division. Also given the
new types of divisor and divident, use the cheaper DIV_ROUND_CLOSEST()
division instead of DIV_ROUND_CLOSEST_ULL().
The error introduced by using nanoseconds instead of picoseconds isn't
zero in corner cases, but with ref_clk_rate < 500 MHz doesn't increase
the order of the error.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
0 commit comments