mirror-linux/drivers/dpll
Ivan Vecera c1224569ce dpll: zl3073x: make frequency monitor a per-device attribute
The frequency monitoring feature uses shared hardware registers
that measure input reference frequencies independently of
individual DPLL channels. However, the freq_monitor flag was
incorrectly placed in the per-DPLL structure, causing each
channel to track its own enable/disable state independently.

Since the DPLL core calls measured_freq_get() only for the first
pin registration, the measured_freq_check() in the periodic worker
was gated by the per-DPLL freq_monitor flag of whichever channel
happens to be checked. If the first DPLL channel had frequency
monitoring disabled while another had it enabled, measurements
were never reported.

Move freq_monitor from struct zl3073x_dpll to struct zl3073x_dev
so all DPLL channels share a single flag, matching the hardware
behavior. Update freq_monitor_set() to notify other DPLL devices
about the change (like phase_offset_avg_factor_set() already does)
and remove the mode-dependent guard in zl3073x_dpll_changes_check()
since all input pin monitoring (pin state, phase offset, FFO, and
measured frequency) works correctly in all DPLL modes.

Fixes: bfc923b642 ("dpll: zl3073x: implement frequency monitoring")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20260526074525.1451008-4-ivecera@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-05-28 14:05:29 +02:00
..
zl3073x dpll: zl3073x: make frequency monitor a per-device attribute 2026-05-28 14:05:29 +02:00
Kconfig dpll: Add reference count tracking support 2026-02-05 15:57:46 +01:00
Makefile dpll: Add basic Microchip ZL3073x support 2025-07-09 19:08:52 -07:00
dpll_core.c dpll: add frequency monitoring callback ops 2026-04-03 16:48:01 -07:00
dpll_core.h dpll: Add reference count tracking support 2026-02-05 15:57:46 +01:00
dpll_netlink.c dpll: export __dpll_device_change_ntf() for use under dpll_lock 2026-05-28 14:05:29 +02:00
dpll_netlink.h dpll: export __dpll_pin_change_ntf() for use under dpll_lock 2026-04-30 11:37:39 +02:00
dpll_nl.c dpll: add frequency monitoring to netlink spec 2026-04-03 16:48:01 -07:00
dpll_nl.h tools: ynl-gen: add regeneration comment 2025-11-25 19:20:42 -08:00