Re: [PATCH net-next 2/3] dpll: add dpll_device op to set working mode

From: Ivan Vecera

Date: Mon Jan 12 2026 - 08:10:21 EST




On 1/12/26 12:35 PM, Vadim Fedorenko wrote:
diff --git a/Documentation/netlink/specs/dpll.yaml b/Documentation/ netlink/specs/dpll.yaml
index 78d0724d7e12c..b55afa77eac4b 100644
--- a/Documentation/netlink/specs/dpll.yaml
+++ b/Documentation/netlink/specs/dpll.yaml
@@ -550,6 +550,7 @@ operations:
          request:
            attributes:
              - id
+            - mode
              - phase-offset-monitor
              - phase-offset-avg-factor
      -
diff --git a/drivers/dpll/dpll_netlink.c b/drivers/dpll/dpll_netlink.c
index d6a0e272d7038..37ca90ab841bd 100644
--- a/drivers/dpll/dpll_netlink.c
+++ b/drivers/dpll/dpll_netlink.c
@@ -853,6 +853,45 @@ int dpll_pin_change_ntf(struct dpll_pin *pin)
  }
  EXPORT_SYMBOL_GPL(dpll_pin_change_ntf);
+static int
+dpll_mode_set(struct dpll_device *dpll, struct nlattr *a,
+          struct netlink_ext_ack *extack)
+{
+    const struct dpll_device_ops *ops = dpll_device_ops(dpll);
+    enum dpll_mode mode = nla_get_u32(a), old_mode;
+    DECLARE_BITMAP(modes, DPLL_MODE_MAX) = { 0 };

I believe the size of bitmap should be DPLL_MODE_MAX + 1 or
__DPLL_MODE_MAX?

Yes, you are right... will fix.

Thanks,
Ivan