]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dpll: zl3073x: use struct_group to partition states
authorIvan Vecera <ivecera@redhat.com>
Sun, 15 Mar 2026 17:42:19 +0000 (18:42 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Mar 2026 02:05:12 +0000 (19:05 -0700)
commitf327f5a8115e80d954598cf2d5c461873042b7f6
tree23cac2cf31bde9cda9cc45ee2fec280a045929f4
parentbb8539e0e60916ef3ed4a92eb2f3cfd8e34061ef
dpll: zl3073x: use struct_group to partition states

Organize the zl3073x_out, zl3073x_ref, and zl3073x_synth structures
using struct_group() to partition fields into semantic groups:

  * cfg:  mutable configuration written to HW via state_set
  * inv:  invariant fields set once during state_fetch
  * stat: read-only status

This enables group-level operations in place of field-by-field copies:

  * state_set validates invariants haven't changed (WARN_ON + -EINVAL)
  * state_set short-circuits when cfg is unchanged
  * state_set copy entire groups in a single assignment instead of
    enumerating each field

Add kernel doc for zl3073x_out_state_set and zl3073x_ref_state_set
documenting the new invariant validation and short-circuit semantics.

Remove forward declaration of zl3073x_synth_state_set().

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