Skip to content

dpll: zl3073x: Include current frequency in supported frequencies list

Ivan Vecera lkml netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2dpll: zl3073x: Add output pin frequency helperdrivers/dpll/zl3073x/core.h drivers/dpll/zl3073x/dpll.c drivers/dpll/zl3073x/out.h+48 -380 repliesApplied
2/2dpll: zl3073x: Include current frequency in supported frequencies listdrivers/dpll/zl3073x/prop.c+21 -110 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] dpll: zl3073x: Include current frequency in supported frequencies list

This series ensures that the current operating frequency of a DPLL pin is always reported in its supported frequencies list.

Problem:
When a ZL3073x DPLL pin is registered, its supported frequencies are read from the firmware node's "supported-frequencies-hz" property. However, if the firmware node is missing, or doesn't include the current operating frequency, the pin reports a frequency that isn't in its supported list. This inconsistency can confuse userspace tools that expect the current frequency to be among the supported values.

Solution:
Always include the current pin frequency as the first entry in the supported frequencies list, followed by any additional frequencies from the firmware node (with duplicates filtered out).

Patch 1 refactors the output pin frequency calculation into a reusable helper function zl3073x_dev_output_pin_freq_get(), which mirrors the existing zl3073x_dev_ref_freq_get() for input pins.

Patch 2 modifies zl3073x_pin_props_get() to obtain the current frequency early and place it at index 0 of the supported frequencies array, ensuring it is always present regardless of firmware node contents.

Ivan Vecera (2):
dpll: zl3073x: Add output pin frequency helper
dpll: zl3073x: Include current frequency in supported frequencies list

 drivers/dpll/zl3073x/core.h | 30 ++++++++++++++++++++++++++++
 drivers/dpll/zl3073x/dpll.c | 39 +------------------------------------
 drivers/dpll/zl3073x/out.h  | 17 ++++++++++++++++
 drivers/dpll/zl3073x/prop.c | 32 +++++++++++++++++++-----------
 4 files changed, 69 insertions(+), 49 deletions(-)
Signature · 1 line
2.52.0