Skip to content

Commit 2efd9b8

Browse files
committed
devlink: Add new "clock_id" generic device param
JIRA: https://issues.redhat.com/browse/RHEL-105064 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 fff3029 commit 2efd9b8

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
@@ -542,6 +542,7 @@ enum devlink_param_generic_id {
542542
DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE,
543543
DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE,
544544
DEVLINK_PARAM_GENERIC_ID_ENABLE_PHC,
545+
DEVLINK_PARAM_GENERIC_ID_CLOCK_ID,
545546

546547
/* add new param generic ids above here*/
547548
__DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -603,6 +604,9 @@ enum devlink_param_generic_id {
603604
#define DEVLINK_PARAM_GENERIC_ENABLE_PHC_NAME "enable_phc"
604605
#define DEVLINK_PARAM_GENERIC_ENABLE_PHC_TYPE DEVLINK_PARAM_TYPE_BOOL
605606

607+
#define DEVLINK_PARAM_GENERIC_CLOCK_ID_NAME "clock_id"
608+
#define DEVLINK_PARAM_GENERIC_CLOCK_ID_TYPE DEVLINK_PARAM_TYPE_U64
609+
606610
#define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \
607611
{ \
608612
.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)