]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dpll: zl3073x: Cache all output properties in zl3073x_out
authorIvan Vecera <ivecera@redhat.com>
Thu, 13 Nov 2025 07:41:04 +0000 (08:41 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 18 Nov 2025 04:23:37 +0000 (20:23 -0800)
commit5fb9b0d411f81ec46833ea8e43c0263515060c64
tree946061d45254cc0041bd4301f5be6d6defa59f41
parent5bc02b190a3fb703bf8cadc4d778fc22cd4d1e78
dpll: zl3073x: Cache all output properties in zl3073x_out

Expand the zl3073x_out structure to cache all output-related
hardware registers, including divisors, widths, embedded-sync
parameters and phase compensation.

Modify zl3073x_out_state_fetch() to read and populate all these
new fields at once, including zero-divisor checks. Refactor all
dpll "getter" functions in dpll.c to read from this new
cached state instead of performing direct register access.

Introduce a new function, zl3073x_out_state_set(), to handle
writing changes back to the hardware. This function compares the
provided state with the current cached state and writes *only* the
modified register values via a single mailbox sequence before
updating the local cache.

Refactor all dpll "setter" functions to modify a local copy of
the output state and then call zl3073x_out_state_set() to
commit the changes.

This change centralizes all output-related register I/O into
out.c, significantly reduces bus traffic, and simplifies the logic
in dpll.c.

Reviewed-by: Petr Oros <poros@redhat.com>
Tested-by: Prathosh Satish <Prathosh.Satish@microchip.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Link: https://patch.msgid.link/20251113074105.141379-6-ivecera@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/dpll/zl3073x/dpll.c
drivers/dpll/zl3073x/out.c
drivers/dpll/zl3073x/out.h