Skip to content

Commit a5679d1

Browse files
committed
devlink: Add new "clock_id" generic device param
JIRA: https://issues.redhat.com/browse/RHEL-104975 commit de9ccf2 Author: Ivan Vecera <ivecera@redhat.com> Date: Fri Jul 4 20:21:54 2025 +0200 devlink: Add new "clock_id" generic device param Add a new device generic parameter to specify clock ID that should be used by the device for registering DPLL devices and pins. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20250704182202.1641943-5-ivecera@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
1 parent 44f9994 commit a5679d1

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Documentation/networking/devlink/devlink-params.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,6 @@ own name.
140140
* - ``enable_phc``
141141
- Boolean
142142
- Enable PHC (PTP Hardware Clock) functionality in the device.
143+
* - ``clock_id``
144+
- u64
145+
- Clock ID used by the device for registering DPLL devices and pins.

include/net/devlink.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ enum devlink_param_generic_id {
523523
DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE,
524524
DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE,
525525
DEVLINK_PARAM_GENERIC_ID_ENABLE_PHC,
526+
DEVLINK_PARAM_GENERIC_ID_CLOCK_ID,
526527

527528
/* add new param generic ids above here*/
528529
__DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -584,6 +585,9 @@ enum devlink_param_generic_id {
584585
#define DEVLINK_PARAM_GENERIC_ENABLE_PHC_NAME "enable_phc"
585586
#define DEVLINK_PARAM_GENERIC_ENABLE_PHC_TYPE DEVLINK_PARAM_TYPE_BOOL
586587

588+
#define DEVLINK_PARAM_GENERIC_CLOCK_ID_NAME "clock_id"
589+
#define DEVLINK_PARAM_GENERIC_CLOCK_ID_TYPE DEVLINK_PARAM_TYPE_U64
590+
587591
#define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \
588592
{ \
589593
.id = DEVLINK_PARAM_GENERIC_ID_##_id, \

net/devlink/param.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ static const struct devlink_param devlink_param_generic[] = {
9797
.name = DEVLINK_PARAM_GENERIC_ENABLE_PHC_NAME,
9898
.type = DEVLINK_PARAM_GENERIC_ENABLE_PHC_TYPE,
9999
},
100+
{
101+
.id = DEVLINK_PARAM_GENERIC_ID_CLOCK_ID,
102+
.name = DEVLINK_PARAM_GENERIC_CLOCK_ID_NAME,
103+
.type = DEVLINK_PARAM_GENERIC_CLOCK_ID_TYPE,
104+
},
100105
};
101106

102107
static int devlink_param_generic_verify(const struct devlink_param *param)

0 commit comments

Comments
 (0)