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: ad4630: Specify PWM parameters in nanoseconds
With ref_clk running with a rate not bigger than 1 GHz there is no gain
in using picosecond units as two different PWM settings differ by at
least one nanosecond. So there is no need to differ from upstream where
the pwm subsystem uses nanoseconds to specify PWM parameters.
With the goal to drop support for time_unit, don't explicitly set
state.time_unit = PWM_UNIT_NSEC but rely on this being the default.
Note that in corner cases this change might result in different settings
being used. However with the current implemention in the axi-pwmgen
driver the result only gets more exact because only one rounding
operation is done.
Note further the rounding of the phase value isn't exact. I didn't try
to do the math to make this exact because I assume having .phase >
.period doesn't have the intended effect anyhow. Also with an input rate
of less than 500 MHz for the PWM the error cancels out when the absolute
time is converted to clock ticks.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
0 commit comments