]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dpll: zl3073x: drop selected and simplify connected ref getter
authorIvan Vecera <ivecera@redhat.com>
Sun, 15 Mar 2026 17:42:24 +0000 (18:42 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Mar 2026 02:05:12 +0000 (19:05 -0700)
commitacee049a6af2a7b4baabd28f16fb53628ea6e7a5
tree66b56e2d420508c79f2b33e73bac6c78fd3d8d55
parentf6b075bc3ad545d1c91e181c3f8ea6193d01602f
dpll: zl3073x: drop selected and simplify connected ref getter

The HW reports the currently selected reference in the
dpll_refsel_status register regardless of the DPLL mode. Use this to
delete zl3073x_dpll_selected_ref_get() and have callers read the
register directly via the cached channel state.

Simplify zl3073x_dpll_connected_ref_get() to check refsel_state for
LOCK directly and return the reference index, changing the return
type from int to u8. The redundant ref_is_status_ok check is removed
since the DPLL cannot be in LOCK state with a failed reference.

In zl3073x_dpll_mode_set(), replace the selected_ref_get() call with
zl3073x_chan_refsel_ref_get() to read the currently selected
reference directly from the cached channel state.

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