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: ad400x: Make requested sampling frequency a hard upper limit
Usually freq is the maximal allowed frequency documented in the data
sheet. So it makes sense to interpret a request to set a given frequency
`freq` as: Sample as fast as possible, but not faster than `freq`.
The math to achieve this is a bit harder than what is currently
implemented in the driver. The status quo however doesn't ensure that
the sample frequency isn't faster than the maximal allowed freq.
(E.g. for st->ref_clk_rate = 166666665 and freq = 2000000, .period = 500
was passed to pwm_apply_state() which resulted in configuring a period
of approx. 498 ns which results in a higher sample rate than 2000000
Hz.)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
0 commit comments