summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2026-04-30 16:22:06 +0200
committerPaolo Abeni <pabeni@redhat.com>2026-04-30 16:22:06 +0200
commit82968921d206abeef34bbfdb643d62a08dc7fe30 (patch)
tree562b6e7a43b0f575ac36bdec20a77e18d00de119 /include
parentfdd2c9a1d082c838ad8b66d7795c6dd450a8c9ee (diff)
parentc53f8f8dce776e032b1a11fb4d9b6e12bb63d958 (diff)
Merge branch 'dpll-add-pin-operational-state'
Ivan Vecera says: ==================== dpll: add pin operational state Add pin operational state (operstate) to the DPLL subsystem to separate administrative intent from actual hardware status. Currently pin-state mixes what the user requested (connected, selectable, disconnected) with what the hardware is actually doing. This makes it difficult to diagnose situations where a user sets a pin as selectable or connected but the hardware cannot use it due to signal issues. The new operstate attribute is reported inside the pin-parent-device nest alongside the existing state and is read-only. Defined values: - active: pin is qualified and actively used by the DPLL - standby: pin is qualified but not actively used by the DPLL - no-signal: pin does not have a valid signal - qual-failed: pin signal failed qualification checks Patch 1 adds the operstate enum, netlink attribute and the operstate_on_dpll_get callback to the DPLL subsystem. It also updates Documentation/driver-api/dpll.rst to describe the separation between admin state and operational state. Patch 2 implements the callback for ZL3073x input pins using the reference monitor status register. It also refactors the existing state_on_dpll_get to return purely administrative state and switches periodic monitoring to track operstate changes. ==================== Link: https://patch.msgid.link/20260428154907.2820654-1-ivecera@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dpll.h6
-rw-r--r--include/uapi/linux/dpll.h23
2 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/dpll.h b/include/linux/dpll.h
index b7277a8b484d..b6f16c884b99 100644
--- a/include/linux/dpll.h
+++ b/include/linux/dpll.h
@@ -85,6 +85,12 @@ struct dpll_pin_ops {
const struct dpll_device *dpll,
void *dpll_priv, enum dpll_pin_state *state,
struct netlink_ext_ack *extack);
+ int (*operstate_on_dpll_get)(const struct dpll_pin *pin,
+ void *pin_priv,
+ const struct dpll_device *dpll,
+ void *dpll_priv,
+ enum dpll_pin_operstate *operstate,
+ struct netlink_ext_ack *extack);
int (*state_on_pin_set)(const struct dpll_pin *pin, void *pin_priv,
const struct dpll_pin *parent_pin,
void *parent_pin_priv,
diff --git a/include/uapi/linux/dpll.h b/include/uapi/linux/dpll.h
index 871685f7c353..cb363cccf2e2 100644
--- a/include/uapi/linux/dpll.h
+++ b/include/uapi/linux/dpll.h
@@ -179,6 +179,28 @@ enum dpll_pin_state {
};
/**
+ * enum dpll_pin_operstate - defines possible operational states of a pin with
+ * respect to its parent DPLL device, valid values for DPLL_A_PIN_OPERSTATE
+ * attribute
+ * @DPLL_PIN_OPERSTATE_ACTIVE: pin is qualified and actively used by the DPLL
+ * @DPLL_PIN_OPERSTATE_STANDBY: pin is qualified but not actively used by the
+ * DPLL
+ * @DPLL_PIN_OPERSTATE_NO_SIGNAL: pin does not have a valid signal
+ * @DPLL_PIN_OPERSTATE_QUAL_FAILED: pin signal failed qualification (e.g.
+ * frequency or phase monitor)
+ */
+enum dpll_pin_operstate {
+ DPLL_PIN_OPERSTATE_ACTIVE = 1,
+ DPLL_PIN_OPERSTATE_STANDBY,
+ DPLL_PIN_OPERSTATE_NO_SIGNAL,
+ DPLL_PIN_OPERSTATE_QUAL_FAILED,
+
+ /* private: */
+ __DPLL_PIN_OPERSTATE_MAX,
+ DPLL_PIN_OPERSTATE_MAX = (__DPLL_PIN_OPERSTATE_MAX - 1)
+};
+
+/**
* enum dpll_pin_capabilities - defines possible capabilities of a pin, valid
* flags on DPLL_A_PIN_CAPABILITIES attribute
* @DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE: pin direction can be changed
@@ -257,6 +279,7 @@ enum dpll_a_pin {
DPLL_A_PIN_PHASE_ADJUST_GRAN,
DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT,
DPLL_A_PIN_MEASURED_FREQUENCY,
+ DPLL_A_PIN_OPERSTATE,
__DPLL_A_PIN_MAX,
DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)