]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dpll: zl3073x: Split ref, out, and synth logic from core
authorIvan Vecera <ivecera@redhat.com>
Thu, 13 Nov 2025 07:41:01 +0000 (08:41 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 18 Nov 2025 04:23:37 +0000 (20:23 -0800)
commit607f2c00c61faa3b437dbb0d38287e7a9d398a52
tree840c21c1ddc9c30bd70612fc83bc7232ccf4c236
parent58fb88d30b0250f928e1afa0eaa4547770d86229
dpll: zl3073x: Split ref, out, and synth logic from core

Refactor the zl3073x driver by splitting the logic for input
references, outputs and synthesizers out of the monolithic
core.[ch] files.

Move the logic for each functional block into its own dedicated files:
ref.[ch], out.[ch] and synth.[ch].

Specifically:
- Move state structures (zl3073x_ref, zl3073x_out, zl3073x_synth)
  from core.h into their respective new headers
- Move state-fetching functions (..._state_fetch) from core.c to their
  new .c files
- Move the zl3073x_ref_freq_factorize helper from core.c to ref.c
- Introduce a new helper layer to decouple the core device logic from
  the state-parsing logic:
  1. Move the original inline helpers (e.g., zl3073x_ref_is_enabled)
     to the new headers (ref.h, etc.) and make them operate on a
     const struct ... * pointer.
  2. Create new zl3073x_dev_... prefixed functions in core.h
     (e.g., zl3073x_dev_ref_is_enabled) and Implement these _dev_ functions
     to fetch state using a new ..._state_get() helper and then call
     the non-prefixed helper.
  3. Update all driver-internal callers (in dpll.c, prop.c, etc.) to use
     the new zl3073x_dev_... functions.

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-3-ivecera@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/dpll/zl3073x/Makefile
drivers/dpll/zl3073x/core.c
drivers/dpll/zl3073x/core.h
drivers/dpll/zl3073x/dpll.c
drivers/dpll/zl3073x/out.c [new file with mode: 0644]
drivers/dpll/zl3073x/out.h [new file with mode: 0644]
drivers/dpll/zl3073x/prop.c
drivers/dpll/zl3073x/ref.c [new file with mode: 0644]
drivers/dpll/zl3073x/ref.h [new file with mode: 0644]
drivers/dpll/zl3073x/synth.c [new file with mode: 0644]
drivers/dpll/zl3073x/synth.h [new file with mode: 0644]