public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] dpll: add actual frequency monitoring feature
@ 2026-03-25 19:39 Ivan Vecera
  2026-03-25 19:39 ` [PATCH net-next 1/3] dpll: add actual frequency monitoring to netlink spec Ivan Vecera
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ivan Vecera @ 2026-03-25 19:39 UTC (permalink / raw)
  To: netdev
  Cc: Vadim Fedorenko, Arkadiusz Kubalewski, Jiri Pirko,
	Jonathan Corbet, Shuah Khan, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Donald Hunter,
	Prathosh Satish, Petr Oros, linux-doc, linux-kernel

This series adds support for monitoring the actual (measured) input
frequency of DPLL input pins via the DPLL netlink interface.

Some DPLL devices can measure the actual frequency being received on
input pins. Previously, the ZL3073x driver exposed this through the
hwmon interface using custom sysfs attributes, but this was rejected
as frequency is not a valid hwmon attribute. This series implements the
feature properly through the DPLL netlink interface instead.

The approach mirrors the existing phase-offset-monitor feature:
a device-level attribute (DPLL_A_FREQUENCY_MONITOR) enables or
disables monitoring, and a per-pin attribute (DPLL_A_PIN_ACTUAL_FREQUENCY)
exposes the measured frequency in Hz when monitoring is enabled.

Patch 1 adds the new attributes to the DPLL netlink spec (dpll.yaml),
regenerates the auto-generated UAPI header and netlink policy, and
updates Documentation/driver-api/dpll.rst.

Patch 2 adds the callback operations (freq_monitor_get/set for
devices, actual_freq_get for pins) and the corresponding netlink GET/SET
handlers in the DPLL core. The core only invokes actual_freq_get when
the frequency monitor is enabled on the parent device.

Patch 3 implements the feature in the ZL3073x driver by extracting
a common measurement latch helper from the existing FFO update path,
adding a frequency measurement function, and wiring up the new
callbacks.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Ivan Vecera (3):
  dpll: add actual frequency monitoring to netlink spec
  dpll: add actual frequency monitoring callback ops
  dpll: zl3073x: implement actual frequency monitoring

 Documentation/driver-api/dpll.rst     | 18 ++++++
 Documentation/netlink/specs/dpll.yaml | 17 +++++
 drivers/dpll/dpll_netlink.c           | 90 +++++++++++++++++++++++++++
 drivers/dpll/dpll_nl.c                |  5 +-
 drivers/dpll/zl3073x/core.c           | 88 ++++++++++++++++++++++----
 drivers/dpll/zl3073x/dpll.c           | 88 +++++++++++++++++++++++++-
 drivers/dpll/zl3073x/dpll.h           |  2 +
 drivers/dpll/zl3073x/ref.h            | 14 +++++
 include/linux/dpll.h                  | 12 ++++
 include/uapi/linux/dpll.h             |  2 +
 10 files changed, 320 insertions(+), 16 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-26 11:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 19:39 [PATCH net-next 0/3] dpll: add actual frequency monitoring feature Ivan Vecera
2026-03-25 19:39 ` [PATCH net-next 1/3] dpll: add actual frequency monitoring to netlink spec Ivan Vecera
2026-03-26 11:06   ` Vadim Fedorenko
2026-03-25 19:39 ` [PATCH net-next 2/3] dpll: add actual frequency monitoring callback ops Ivan Vecera
2026-03-26 11:21   ` Vadim Fedorenko
2026-03-25 19:39 ` [PATCH net-next 3/3] dpll: zl3073x: implement actual frequency monitoring Ivan Vecera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox