]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dpll: zl3073x: add DPLL channel status fields to zl3073x_chan
authorIvan Vecera <ivecera@redhat.com>
Sun, 15 Mar 2026 17:42:22 +0000 (18:42 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Mar 2026 02:05:12 +0000 (19:05 -0700)
commit41bab554d7e9840e17e4c8c7e93647161c6596bf
treeb6636576b7306e9b52dd293eb1ad03f2d8660ce0
parent3032e95987fa0da656ce3a5eb454674e7cc60a12
dpll: zl3073x: add DPLL channel status fields to zl3073x_chan

Add mon_status and refsel_status fields to struct zl3073x_chan in a
stat group to cache the 'dpll_mon_status' and 'dpll_refsel_status'
registers.

Add zl3073x_chan_lock_state_get(), zl3073x_chan_is_ho_ready(),
zl3073x_chan_refsel_state_get() and zl3073x_chan_refsel_ref_get()
inline helpers for reading cached state, and zl3073x_chan_state_update()
for refreshing both registers from hardware. Call it from
zl3073x_chan_state_fetch() as well so that channel status is
initialized at device startup.

Call zl3073x_dev_chan_states_update() from the periodic work to
keep the cached state up to date and convert
zl3073x_dpll_lock_status_get() and zl3073x_dpll_selected_ref_get()
to use the cached state via the new helpers instead of direct register
reads.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20260315174224.399074-5-ivecera@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/dpll/zl3073x/chan.c
drivers/dpll/zl3073x/chan.h
drivers/dpll/zl3073x/core.c
drivers/dpll/zl3073x/dpll.c