* [PATCH iproute2-next 0/3] dpll: add missing type and capability names
@ 2026-11-26 9:05 Petr Oros
2026-11-26 9:05 ` [PATCH iproute2-next 1/3] dpll: add the int-nco pin type Petr Oros
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Petr Oros @ 2026-11-26 9:05 UTC (permalink / raw)
To: netdev; +Cc: Petr Oros, David Ahern, Stephen Hemminger, Ivan Vecera,
Jiri Pirko
The kernel has three dpll uapi values that the tool does not know yet.
DPLL_PIN_TYPE_INT_NCO is the type of the virtual pin that switches a
zl3073x DPLL into NCO mode. DPLL_TYPE_GENERIC is the device type of
DPLLs that are neither PPS nor EEC, and ice registers such devices.
DPLL_PIN_CAPABILITIES_STATE_CONNECTED_OVERRIDE marks pins that can be
connected while their device is in automatic mode. All three are
already in the uapi header of iproute2. The tool prints such pins and
devices with "type: unknown", refuses the two type names as filters and
as id-get arguments, and leaves the capability out of its output.
Each patch adds one of the names to the tool and the man page. The two
type patches add it to the bash completion as well.
Petr Oros (3):
dpll: add the int-nco pin type
dpll: add the generic device type
dpll: add the state-connected-override pin capability
bash-completion/dpll | 8 ++++----
dpll/dpll.c | 22 +++++++++++++++++-----
man/man8/dpll.8 | 22 +++++++++++++++-------
3 files changed, 36 insertions(+), 16 deletions(-)
--
2.56.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH iproute2-next 1/3] dpll: add the int-nco pin type
2026-11-26 9:05 [PATCH iproute2-next 0/3] dpll: add missing type and capability names Petr Oros
@ 2026-11-26 9:05 ` Petr Oros
2026-11-26 10:24 ` Ivan Vecera
2026-11-26 9:05 ` [PATCH iproute2-next 2/3] dpll: add the generic device type Petr Oros
2026-11-26 9:05 ` [PATCH iproute2-next 3/3] dpll: add the state-connected-override pin capability Petr Oros
2 siblings, 1 reply; 7+ messages in thread
From: Petr Oros @ 2026-11-26 9:05 UTC (permalink / raw)
To: netdev; +Cc: Petr Oros, David Ahern, Stephen Hemminger, Ivan Vecera,
Jiri Pirko
DPLL_PIN_TYPE_INT_NCO is the kernel pin type of the virtual pin that
represents the NCO mode of a DPLL, and the zl3073x driver registers such
a pin. The uapi header in iproute2 already has the value, but the tool
has no name for it. The pin is shown with "type: unknown" and "type
int-nco" is refused both as a filter of "dpll pin show" and as an
argument of "dpll pin id-get".
Add the name to the pin type map, to the man page and to the bash
completion. The list of type names used by the two error messages moves
to a macro, so that it is kept in one place and the lines that print it
stay within 100 columns.
Signed-off-by: Petr Oros <poros@redhat.com>
---
bash-completion/dpll | 4 ++--
dpll/dpll.c | 8 +++++---
man/man8/dpll.8 | 6 +++---
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/bash-completion/dpll b/bash-completion/dpll
index 8b11f8d0c34fad..cfd39c5e0c7a53 100644
--- a/bash-completion/dpll
+++ b/bash-completion/dpll
@@ -178,7 +178,7 @@ _dpll_pin()
;;
type)
COMPREPLY=( $( compgen -W "mux ext synce-eth-port \
- int-oscillator gnss" -- "$cur" ) )
+ int-oscillator gnss int-nco" -- "$cur" ) )
return 0
;;
direction)
@@ -279,7 +279,7 @@ _dpll_pin()
;;
type)
COMPREPLY=( $( compgen -W "mux ext synce-eth-port \
- int-oscillator gnss" -- "$cur" ) )
+ int-oscillator gnss int-nco" -- "$cur" ) )
return 0
;;
*)
diff --git a/dpll/dpll.c b/dpll/dpll.c
index 5828e78f738eac..a0a5e3f9a2f152 100644
--- a/dpll/dpll.c
+++ b/dpll/dpll.c
@@ -78,11 +78,14 @@ static struct str_num_map pin_type_map[] = {
{ .str = "synce-eth-port", .num = DPLL_PIN_TYPE_SYNCE_ETH_PORT },
{ .str = "int-oscillator", .num = DPLL_PIN_TYPE_INT_OSCILLATOR },
{ .str = "gnss", .num = DPLL_PIN_TYPE_GNSS },
+ { .str = "int-nco", .num = DPLL_PIN_TYPE_INT_NCO },
{
.str = NULL,
},
};
+#define DPLL_PIN_TYPE_NAMES "mux/ext/synce-eth-port/int-oscillator/gnss/int-nco"
+
static struct str_num_map pin_direction_map[] = {
{ .str = "input", .num = DPLL_PIN_DIRECTION_INPUT },
{ .str = "output", .num = DPLL_PIN_DIRECTION_OUTPUT },
@@ -253,8 +256,7 @@ static int dpll_parse_pin_type(struct dpll *dpll, __u32 *type)
const char *str = dpll_argv(dpll);
if (str_to_dpll_pin_type(str, type)) {
- pr_err("invalid type: %s (use mux/ext/synce-eth-port/int-oscillator/gnss)\n",
- str);
+ pr_err("invalid type: %s (use " DPLL_PIN_TYPE_NAMES ")\n", str);
return -EINVAL;
}
dpll_arg_inc(dpll);
@@ -2052,7 +2054,7 @@ static int cmd_pin_show(struct dpll *dpll)
&filter.present,
DPLL_FILTER_PIN_TYPE,
str_to_dpll_pin_type,
- "mux/ext/synce-eth-port/int-oscillator/gnss"))
+ DPLL_PIN_TYPE_NAMES))
return -EINVAL;
} else if (dpll_argv_match(dpll, "direction")) {
if (dpll_filter_parse_enum(dpll, "direction",
diff --git a/man/man8/dpll.8 b/man/man8/dpll.8
index 92d4ead0010bc6..84c21e7980eb2b 100644
--- a/man/man8/dpll.8
+++ b/man/man8/dpll.8
@@ -245,7 +245,7 @@ Show only pins with the specified package label.
.TP
.BI type " TYPE"
Show only pins of the specified type:
-.BR mux ", " ext ", " synce-eth-port ", " int-oscillator ", " gnss .
+.BR mux ", " ext ", " synce-eth-port ", " int-oscillator ", " gnss ", " int-nco .
.TP
.BI direction " DIR"
@@ -288,7 +288,7 @@ Panel label
.IP \[bu]
Package label
.IP \[bu]
-Pin type (mux, ext, synce-eth-port, int-oscillator, gnss)
+Pin type (mux, ext, synce-eth-port, int-oscillator, gnss, int-nco)
.IP \[bu]
Configured frequency and supported frequency ranges
.IP \[bu]
@@ -384,7 +384,7 @@ Filter by package label.
.TP
.BI type " TYPE"
Filter by pin type:
-.BR mux ", " ext ", " synce-eth-port ", " int-oscillator ", " gnss .
+.BR mux ", " ext ", " synce-eth-port ", " int-oscillator ", " gnss ", " int-nco .
.SH MONITOR COMMAND
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH iproute2-next 2/3] dpll: add the generic device type
2026-11-26 9:05 [PATCH iproute2-next 0/3] dpll: add missing type and capability names Petr Oros
2026-11-26 9:05 ` [PATCH iproute2-next 1/3] dpll: add the int-nco pin type Petr Oros
@ 2026-11-26 9:05 ` Petr Oros
2026-11-26 10:24 ` Ivan Vecera
2026-11-26 9:05 ` [PATCH iproute2-next 3/3] dpll: add the state-connected-override pin capability Petr Oros
2 siblings, 1 reply; 7+ messages in thread
From: Petr Oros @ 2026-11-26 9:05 UTC (permalink / raw)
To: netdev; +Cc: Petr Oros, David Ahern, Stephen Hemminger, Ivan Vecera,
Jiri Pirko
DPLL_TYPE_GENERIC is the kernel device type of DPLL devices that are
neither PPS nor EEC, and the ice driver registers such devices. The
uapi header in iproute2 already has the value, but the tool has no name
for it. Such a device is shown with "type: unknown" and "type generic"
is refused both as a filter of "dpll device show" and as an argument of
"dpll device id-get".
Add the name to the device type helpers, to the man page and to the
bash completion. The list of device type names used by the two error
messages moves to a macro, as is already done for the pin types.
Signed-off-by: Petr Oros <poros@redhat.com>
---
bash-completion/dpll | 4 ++--
dpll/dpll.c | 10 ++++++++--
man/man8/dpll.8 | 6 +++---
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/bash-completion/dpll b/bash-completion/dpll
index cfd39c5e0c7a53..0251df81159792 100644
--- a/bash-completion/dpll
+++ b/bash-completion/dpll
@@ -70,7 +70,7 @@ _dpll_device()
return 0
;;
type)
- COMPREPLY=( $( compgen -W "pps eec" -- "$cur" ) )
+ COMPREPLY=( $( compgen -W "pps eec generic" -- "$cur" ) )
return 0
;;
mode)
@@ -127,7 +127,7 @@ _dpll_device()
return 0
;;
type)
- COMPREPLY=( $( compgen -W "pps eec" -- "$cur" ) )
+ COMPREPLY=( $( compgen -W "pps eec generic" -- "$cur" ) )
return 0
;;
*)
diff --git a/dpll/dpll.c b/dpll/dpll.c
index a0a5e3f9a2f152..8dc1b8f5033fea 100644
--- a/dpll/dpll.c
+++ b/dpll/dpll.c
@@ -806,6 +806,8 @@ static const char *dpll_type_name(__u32 type)
return "pps";
case DPLL_TYPE_EEC:
return "eec";
+ case DPLL_TYPE_GENERIC:
+ return "generic";
default:
return "unknown";
}
@@ -817,11 +819,15 @@ static int str_to_dpll_type(const char *s, __u32 *type)
*type = DPLL_TYPE_PPS;
else if (!strcmp(s, "eec"))
*type = DPLL_TYPE_EEC;
+ else if (!strcmp(s, "generic"))
+ *type = DPLL_TYPE_GENERIC;
else
return -EINVAL;
return 0;
}
+#define DPLL_TYPE_NAMES "pps/eec/generic"
+
static int str_to_dpll_lock_status(const char *s, __u32 *status)
{
if (!strcmp(s, "unlocked"))
@@ -1290,7 +1296,7 @@ static int cmd_device_show(struct dpll *dpll)
&filter.present,
DPLL_FILTER_DEV_TYPE,
str_to_dpll_type,
- "pps/eec"))
+ DPLL_TYPE_NAMES))
return -EINVAL;
} else if (dpll_argv_match(dpll, "mode")) {
if (dpll_filter_parse_enum(dpll, "mode",
@@ -1421,7 +1427,7 @@ static int cmd_device_id_get(struct dpll *dpll)
return -EINVAL;
}
if (str_to_dpll_type(str, &val)) {
- pr_err("invalid type: %s (use pps/eec)\n", str);
+ pr_err("invalid type: %s (use " DPLL_TYPE_NAMES ")\n", str);
return -EINVAL;
}
mnl_attr_put_u32(nlh, DPLL_A_TYPE, val);
diff --git a/man/man8/dpll.8 b/man/man8/dpll.8
index 84c21e7980eb2b..c1d4a75e072dc8 100644
--- a/man/man8/dpll.8
+++ b/man/man8/dpll.8
@@ -101,7 +101,7 @@ Show only devices with the specified 64-bit clock identifier.
.TP
.BI type " TYPE"
Show only devices of the specified type:
-.BR pps " or " eec .
+.BR pps ", " eec " or " generic .
.TP
.BI mode " MODE"
@@ -133,7 +133,7 @@ Clock quality level (if supported)
.IP \[bu]
Temperature (if supported)
.IP \[bu]
-Type (PPS or EEC)
+Type (PPS, EEC or generic)
.IP \[bu]
Supported modes
.IP \[bu]
@@ -198,7 +198,7 @@ Kernel module name.
.TP
.BI type " TYPE"
Device type:
-.BR pps " or " eec .
+.BR pps ", " eec " or " generic .
.SH PIN COMMANDS
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH iproute2-next 3/3] dpll: add the state-connected-override pin capability
2026-11-26 9:05 [PATCH iproute2-next 0/3] dpll: add missing type and capability names Petr Oros
2026-11-26 9:05 ` [PATCH iproute2-next 1/3] dpll: add the int-nco pin type Petr Oros
2026-11-26 9:05 ` [PATCH iproute2-next 2/3] dpll: add the generic device type Petr Oros
@ 2026-11-26 9:05 ` Petr Oros
2026-11-26 10:25 ` Ivan Vecera
2 siblings, 1 reply; 7+ messages in thread
From: Petr Oros @ 2026-11-26 9:05 UTC (permalink / raw)
To: netdev; +Cc: Petr Oros, David Ahern, Stephen Hemminger, Ivan Vecera,
Jiri Pirko
DPLL_PIN_CAPABILITIES_STATE_CONNECTED_OVERRIDE is the kernel capability
of pins that can be set to the connected state while their parent
device is in automatic mode. The uapi header in iproute2 already has
the flag, but the tool does not know it. A pin with the flag is shown
as "capabilities: 0xc state-can-change" with no name for the new bit,
and the JSON capabilities array leaves it out.
Add the name to the text and JSON output and describe the capability
in the man page.
Signed-off-by: Petr Oros <poros@redhat.com>
---
dpll/dpll.c | 4 ++++
man/man8/dpll.8 | 10 +++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dpll/dpll.c b/dpll/dpll.c
index 8dc1b8f5033fea..cc7da615f6beca 100644
--- a/dpll/dpll.c
+++ b/dpll/dpll.c
@@ -1534,6 +1534,8 @@ static void dpll_pin_capabilities_name(__u32 capabilities)
print_string(PRINT_FP, NULL, " priority-can-change", NULL);
if (capabilities & DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE)
print_string(PRINT_FP, NULL, " direction-can-change", NULL);
+ if (capabilities & DPLL_PIN_CAPABILITIES_STATE_CONNECTED_OVERRIDE)
+ print_string(PRINT_FP, NULL, " state-connected-override", NULL);
}
/* Multi-attribute collection context */
@@ -1587,6 +1589,8 @@ static void dpll_pin_print_capabilities(struct nlattr *attr)
print_string(PRINT_JSON, NULL, NULL, "priority-can-change");
if (caps & DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE)
print_string(PRINT_JSON, NULL, NULL, "direction-can-change");
+ if (caps & DPLL_PIN_CAPABILITIES_STATE_CONNECTED_OVERRIDE)
+ print_string(PRINT_JSON, NULL, NULL, "state-connected-override");
close_json_array(PRINT_JSON, NULL);
print_hex(PRINT_FP, NULL, " capabilities: 0x%x", caps);
diff --git a/man/man8/dpll.8 b/man/man8/dpll.8
index c1d4a75e072dc8..fb8276fcdc5688 100644
--- a/man/man8/dpll.8
+++ b/man/man8/dpll.8
@@ -294,7 +294,8 @@ Configured frequency and supported frequency ranges
.IP \[bu]
Measured frequency in Hz (when frequency monitoring is enabled)
.IP \[bu]
-Capabilities (state-can-change, priority-can-change, direction-can-change)
+Capabilities (state-can-change, priority-can-change, direction-can-change,
+state-connected-override)
.IP \[bu]
Phase adjustment range, granularity, and current value
.IP \[bu]
@@ -549,6 +550,13 @@ or priority within parent-device relationships.
.B direction-can-change
The pin's direction (input/output) can be modified.
+.TP
+.B state-connected-override
+The pin can be set to the connected state also when its parent device is
+in automatic mode, which overrides the automatic input selection. When the
+pin is disconnected again, the device returns to automatic selection. A pin
+with this capability also has state-can-change.
+
.PP
Use
.B dpll pin show
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH iproute2-next 1/3] dpll: add the int-nco pin type
2026-11-26 9:05 ` [PATCH iproute2-next 1/3] dpll: add the int-nco pin type Petr Oros
@ 2026-11-26 10:24 ` Ivan Vecera
0 siblings, 0 replies; 7+ messages in thread
From: Ivan Vecera @ 2026-11-26 10:24 UTC (permalink / raw)
To: Petr Oros, netdev; +Cc: David Ahern, Stephen Hemminger, Jiri Pirko
On 11/26/26 10:05, Petr Oros wrote:
> DPLL_PIN_TYPE_INT_NCO is the kernel pin type of the virtual pin that
> represents the NCO mode of a DPLL, and the zl3073x driver registers such
> a pin. The uapi header in iproute2 already has the value, but the tool
> has no name for it. The pin is shown with "type: unknown" and "type
> int-nco" is refused both as a filter of "dpll pin show" and as an
> argument of "dpll pin id-get".
>
> Add the name to the pin type map, to the man page and to the bash
> completion. The list of type names used by the two error messages moves
> to a macro, so that it is kept in one place and the lines that print it
> stay within 100 columns.
>
> Signed-off-by: Petr Oros <poros@redhat.com>
> ---
> bash-completion/dpll | 4 ++--
> dpll/dpll.c | 8 +++++---
> man/man8/dpll.8 | 6 +++---
> 3 files changed, 10 insertions(+), 8 deletions(-)
>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH iproute2-next 2/3] dpll: add the generic device type
2026-11-26 9:05 ` [PATCH iproute2-next 2/3] dpll: add the generic device type Petr Oros
@ 2026-11-26 10:24 ` Ivan Vecera
0 siblings, 0 replies; 7+ messages in thread
From: Ivan Vecera @ 2026-11-26 10:24 UTC (permalink / raw)
To: Petr Oros, netdev; +Cc: David Ahern, Stephen Hemminger, Jiri Pirko
On 11/26/26 10:05, Petr Oros wrote:
> DPLL_TYPE_GENERIC is the kernel device type of DPLL devices that are
> neither PPS nor EEC, and the ice driver registers such devices. The
> uapi header in iproute2 already has the value, but the tool has no name
> for it. Such a device is shown with "type: unknown" and "type generic"
> is refused both as a filter of "dpll device show" and as an argument of
> "dpll device id-get".
>
> Add the name to the device type helpers, to the man page and to the
> bash completion. The list of device type names used by the two error
> messages moves to a macro, as is already done for the pin types.
>
> Signed-off-by: Petr Oros <poros@redhat.com>
> ---
> bash-completion/dpll | 4 ++--
> dpll/dpll.c | 10 ++++++++--
> man/man8/dpll.8 | 6 +++---
> 3 files changed, 13 insertions(+), 7 deletions(-)
>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH iproute2-next 3/3] dpll: add the state-connected-override pin capability
2026-11-26 9:05 ` [PATCH iproute2-next 3/3] dpll: add the state-connected-override pin capability Petr Oros
@ 2026-11-26 10:25 ` Ivan Vecera
0 siblings, 0 replies; 7+ messages in thread
From: Ivan Vecera @ 2026-11-26 10:25 UTC (permalink / raw)
To: Petr Oros, netdev; +Cc: David Ahern, Stephen Hemminger, Jiri Pirko
On 11/26/26 10:05, Petr Oros wrote:
> DPLL_PIN_CAPABILITIES_STATE_CONNECTED_OVERRIDE is the kernel capability
> of pins that can be set to the connected state while their parent
> device is in automatic mode. The uapi header in iproute2 already has
> the flag, but the tool does not know it. A pin with the flag is shown
> as "capabilities: 0xc state-can-change" with no name for the new bit,
> and the JSON capabilities array leaves it out.
>
> Add the name to the text and JSON output and describe the capability
> in the man page.
>
> Signed-off-by: Petr Oros <poros@redhat.com>
> ---
> dpll/dpll.c | 4 ++++
> man/man8/dpll.8 | 10 +++++++++-
> 2 files changed, 13 insertions(+), 1 deletion(-)
>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-26 10:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 9:05 [PATCH iproute2-next 0/3] dpll: add missing type and capability names Petr Oros
2026-11-26 9:05 ` [PATCH iproute2-next 1/3] dpll: add the int-nco pin type Petr Oros
2026-11-26 10:24 ` Ivan Vecera
2026-11-26 9:05 ` [PATCH iproute2-next 2/3] dpll: add the generic device type Petr Oros
2026-11-26 10:24 ` Ivan Vecera
2026-11-26 9:05 ` [PATCH iproute2-next 3/3] dpll: add the state-connected-override pin capability Petr Oros
2026-11-26 10:25 ` Ivan Vecera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox