> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Grzegorz Nitka
> Sent: Wednesday, May 20, 2026 11:36 AM
> To: [email protected]
> Cc: Vecera, Ivan <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected]; Kitszel,
> Przemyslaw <[email protected]>; [email protected];
> [email protected]; [email protected]; Kubalewski,
> Arkadiusz <[email protected]>; [email protected];
> [email protected]; [email protected];
> [email protected]; Nguyen, Anthony L
> <[email protected]>; [email protected]; [email protected]
> Subject: [Intel-wired-lan] [PATCH v10 net-next 4/8] dpll: allow fwnode
> pins to attempt state change without capability bit
>
> Pins registered with an fwnode may have .state_on_dpll_set implemented
> without advertising DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE upfront.
> Requiring the bit for fwnode pins ties firmware description to driver
> implementation details unnecessarily.
>
> Relax the capability check in dpll_pin_state_set() and
> dpll_pin_on_pin_state_set(): when a pin has an associated fwnode,
> bypass the capability gate and let the ops layer decide, returning -
> EOPNOTSUPP if .state_on_dpll_set is absent. Non-fwnode pins retain the
> original strict behavior.
>
> This is used later in the series by the SyncE_Ref output pin, which
> relies on the fwnode path for state control.
>
> Signed-off-by: Grzegorz Nitka <[email protected]>
> ---
> drivers/dpll/dpll_netlink.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dpll/dpll_netlink.c b/drivers/dpll/dpll_netlink.c
> index f709e3dcd58e..025b9df4f934 100644
> --- a/drivers/dpll/dpll_netlink.c
> +++ b/drivers/dpll/dpll_netlink.c
> @@ -1327,8 +1327,11 @@ dpll_pin_on_pin_state_set(struct dpll_pin *pin,
> u32 parent_idx,
> unsigned long i;
> int ret;
>
> + /* fwnode pins may not set the capability bit upfront; let the
> ops
> + * layer return -EOPNOTSUPP if the operation is unsupported.
> + */
> if (!(DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE &
> - pin->prop.capabilities)) {
> + pin->prop.capabilities) && !pin->fwnode) {
> NL_SET_ERR_MSG(extack, "state changing is not allowed");
> return -EOPNOTSUPP;
> }
> @@ -1363,8 +1366,11 @@ dpll_pin_state_set(struct dpll_device *dpll,
> struct dpll_pin *pin,
> struct dpll_pin_ref *ref;
> int ret;
>
> + /* fwnode pins may not set the capability bit upfront; let the
> ops
> + * layer return -EOPNOTSUPP if the operation is unsupported.
> + */
> if (!(DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE &
> - pin->prop.capabilities)) {
> + pin->prop.capabilities) && !pin->fwnode) {
> NL_SET_ERR_MSG(extack, "state changing is not allowed");
> return -EOPNOTSUPP;
> }
> --
> 2.39.3
Reviewed-by: Aleksandr Loktionov <[email protected]>