From: Petr Oros <poros@redhat.com>
To: netdev@vger.kernel.org
Cc: Petr Oros <poros@redhat.com>, David Ahern <dsahern@kernel.org>,
Stephen Hemminger <stephen@networkplumber.org>,
Ivan Vecera <ivecera@redhat.com>, Jiri Pirko <jiri@resnulli.us>
Subject: [PATCH iproute2-next 1/3] dpll: add the int-nco pin type
Date: Thu, 26 Nov 2026 10:05:10 +0100 [thread overview]
Message-ID: <20261126090516.4278-2-poros@redhat.com> (raw)
In-Reply-To: <20261126090516.4278-1-poros@redhat.com>
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
next prev parent reply other threads:[~2026-11-26 9:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-11-26 10:24 ` [PATCH iproute2-next 1/3] dpll: add the int-nco pin type 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126090516.4278-2-poros@redhat.com \
--to=poros@redhat.com \
--cc=dsahern@kernel.org \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox