drivers: counter: mcux_gpt: add devicetree run-mode property
Add a "run-mode" devicetree property to the NXP i.MX GPT counter
driver to control counter behavior on compare events.
The property supports two modes:
- "restart": Counter resets to 0 when reaching Compare Channel 1 value
- "free-run": Counter continues counting without reset
This change makes the GPT run mode configurable per device instance
instead of being hardcoded. The driver now derives the enableFreeRun
setting from devicetree, defaulting to "restart" mode.
This update aligns the GPT driver configuration approach with the
NXP LPTMR counter driver, which also uses devicetree properties
for runtime behavior configuration.
This provides consistency across NXP counter drivers in how hardware
behavior is controlled through devicetree.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
2 files changed