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 2/3] dpll: add the generic device type
Date: Thu, 26 Nov 2026 10:05:11 +0100 [thread overview]
Message-ID: <20261126090516.4278-3-poros@redhat.com> (raw)
In-Reply-To: <20261126090516.4278-1-poros@redhat.com>
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
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 ` [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 ` Petr Oros [this message]
2026-11-26 10:24 ` [PATCH iproute2-next 2/3] dpll: add the generic device type 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-3-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