|
|
Log in / Subscribe / Register

dpll: add frequency monitoring feature

From:  Ivan Vecera <ivecera-AT-redhat.com>
To:  netdev-AT-vger.kernel.org
Subject:  [PATCH net-next v2 0/3] dpll: add frequency monitoring feature
Date:  Mon, 30 Mar 2026 12:55:02 +0200
Message-ID:  <20260330105505.715099-1-ivecera@redhat.com>
Cc:  Vadim Fedorenko <vadim.fedorenko-AT-linux.dev>, Arkadiusz Kubalewski <arkadiusz.kubalewski-AT-intel.com>, Jiri Pirko <jiri-AT-resnulli.us>, Jonathan Corbet <corbet-AT-lwn.net>, Shuah Khan <skhan-AT-linuxfoundation.org>, "David S. Miller" <davem-AT-davemloft.net>, Eric Dumazet <edumazet-AT-google.com>, Jakub Kicinski <kuba-AT-kernel.org>, Paolo Abeni <pabeni-AT-redhat.com>, Simon Horman <horms-AT-kernel.org>, Donald Hunter <donald.hunter-AT-gmail.com>, Prathosh Satish <Prathosh.Satish-AT-microchip.com>, Petr Oros <poros-AT-redhat.com>, linux-doc-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org
Archive-link:  Article

This series adds support for monitoring the 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. 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_MEASURED_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, measured_freq_get for pins) and the corresponding netlink
GET/SET handlers in the DPLL core. The core only invokes
measured_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.

Changes v1 -> v2:
- Renamed actual-frequency to measured-frequency (Vadim)

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

Ivan Vecera (3):
  dpll: add frequency monitoring to netlink spec
  dpll: add frequency monitoring callback ops
  dpll: zl3073x: implement 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                  | 10 +++
 include/uapi/linux/dpll.h             |  2 +
 10 files changed, 318 insertions(+), 16 deletions(-)

-- 
2.52.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds