Commit graph zephyr/drivers/counter/Kconfig.mcux_ctimer
Author SHA1 Message Date
Benjamin Perseghetti
9a420255ed drivers: counter: mcux_ctimer: migrate inputmux capture to mux subsystem
The mux subsystem rework converted the PWM and qdec INPUTMUX consumers
to mux-states and deleted the #inputmux-cells specifier space, but this
driver was left behind on inputmux-connections, so enabling capture now
fails at devicetree parse time (counter_capture on frdm_mcxa153).

Convert it the same way as pwm_mcux_ctimer: mux-states in the binding
and test overlay (same cells, renamed), a mux_state_apply() loop in the
driver with its error propagated out of init, select MUX in Kconfig,
and the missing Counter entry in the 4.5 migration guide.

Fixes #115616

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2026-08-12 19:25:43 -04:00
Holt Sun
8e0ba3bb3c drivers: counter: mcux_ctimer: add capture support
Add support for the counter capture API to the MCUX CTIMER driver.
The driver stores capture callbacks per channel, maps Zephyr edge
flags to CTIMER capture modes, enables capture interrupts, and reports
captured TC values from the CTIMER CR registers.

Capture is mutually exclusive with alarms on the same channel because
both features share the counter channel namespace. Add optional
pinctrl and INPUTMUX routing support so boards can route CTIMER capture
sources from devicetree without changing the public counter API.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-07-13 16:43:16 +02:00
Kumar Gala
0f1ed0f4a0 drivers: counter: Update drivers to use devicetree Kconfig symbol
Update counter drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-25 09:38:57 +02:00
Mahesh Mahadevan
649bb3bb44 drivers: counter: Update CTimer to fix alarm setting
1. Make sure the relative alarm value is set correctly
2. Add a Kconfig to give user the option of reserving
   a CTimer channel for implementing the set_top_value
   function

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-05-23 08:38:59 -05:00
Toby Firth
893bfc0fc1 drivers: counter: added ctimer driver for lpcexpresso55s69
Added shim driver for the CTIMERs for the lpcexpresso55s69 board.

Fixes: #22705

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2021-08-24 17:13:22 -04:00