drivers: Counter: Fix LPTMR prescaler setting not work issue
In current code, if timer-mode-sel is 0(Timer Counter Mode),
bypass_prescaler_glitch will be 1, that makes prescaler setting
be bypassed. But this setting is very useful, especially for
long timing count.
In this patch, we update prescale-glitch-filter default value to 0,
to indicate prescaler and glitch filter are disabled, which comply
the existing devices DTS setting (prescaler = 1).
And if user sets prescale-glitch-filter properity other than 0,
we should set bypass_prescaler_glitch to false to make prescaler work,
and the clock frequence should be calculated with prescaler setting.
Update prescaler field in dt-bindings to tell developer should use
prescale-glitch-filter instead.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2 files changed