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: ad_pulsar: 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.
Further use up-rounding instead of round-to-nearest to make the driver
robust to rounding changes in the axi-pwmgen driver and to make freq a
hard upper limit on sample frequency. Upstream pwm drivers are expected
to round down requested values in pwm_apply_state(). There is a
potential error introduced by changing the rounding here until the
axi-pwmgen driver is aligned to mainline requirements. This error is
however in the same order as the already existing one that is introduced
by the integer divisions.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
0 commit comments