mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grzegorz Nitka <grzegorz.nitka@intel.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
	poros@redhat.com, richardcochran@gmail.com,
	andrew+netdev@lunn.ch, przemyslaw.kitszel@intel.com,
	anthony.l.nguyen@intel.com, Prathosh.Satish@microchip.com,
	ivecera@redhat.com, jiri@resnulli.us,
	arkadiusz.kubalewski@intel.com, vadim.fedorenko@linux.dev,
	donald.hunter@gmail.com, horms@kernel.org, pabeni@redhat.com,
	kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
	Grzegorz Nitka <grzegorz.nitka@intel.com>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Jiri Pirko <jiri@nvidia.com>
Subject: [PATCH v14 net-next 09/13] dpll: allow fwnode pins to attempt state change without capability bit
Date: Sun,  7 Jun 2026 20:30:41 +0200	[thread overview]
Message-ID: <20260607183045.1213735-10-grzegorz.nitka@intel.com> (raw)
In-Reply-To: <20260607183045.1213735-1-grzegorz.nitka@intel.com>

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.

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>
---
 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 8232d4543c7d..bf729cde796a 100644
--- a/drivers/dpll/dpll_netlink.c
+++ b/drivers/dpll/dpll_netlink.c
@@ -1325,8 +1325,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;
 	}
@@ -1361,8 +1364,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


  parent reply	other threads:[~2026-06-07 18:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-07 18:30 [PATCH v14 net-next 00/13] dpll/ice: Add generic DPLL type and full TX reference clock control for E825 Grzegorz Nitka
2026-06-07 18:30 ` [PATCH v14 net-next 01/13] dpll: add generic DPLL type Grzegorz Nitka
2026-06-07 18:30 ` [PATCH v14 net-next 02/13] dpll: allow registering FW-identified pin with a different DPLL Grzegorz Nitka
2026-06-07 18:30 ` [PATCH v14 net-next 03/13] dpll: fix stale iteration in dpll_pin_on_pin_unregister() Grzegorz Nitka
2026-06-08 16:51   ` Kubalewski, Arkadiusz
2026-06-09  6:50     ` Nitka, Grzegorz
2026-06-11  8:50   ` Paolo Abeni
2026-06-11 10:01     ` Nitka, Grzegorz
2026-06-11 14:41       ` Paolo Abeni
2026-06-11 17:41         ` Jakub Kicinski
2026-06-11 18:36           ` Nitka, Grzegorz
2026-06-13 20:27             ` Jakub Kicinski
2026-06-07 18:30 ` [PATCH v14 net-next 04/13] dpll: send delete notification before unregister in on-pin rollback Grzegorz Nitka
2026-06-08 16:45   ` Kubalewski, Arkadiusz
2026-06-09  7:09     ` Nitka, Grzegorz
2026-06-10 19:42       ` Nitka, Grzegorz
2026-06-10 21:27         ` Nitka, Grzegorz
2026-06-07 18:30 ` [PATCH v14 net-next 05/13] dpll: emit per-dpll delete notifications in dpll_pin_on_pin_unregister() Grzegorz Nitka
2026-06-08 16:40   ` Kubalewski, Arkadiusz
2026-06-07 18:30 ` [PATCH v14 net-next 06/13] dpll: guard sync-pair removal on full pin unregister Grzegorz Nitka
2026-06-08 16:38   ` Kubalewski, Arkadiusz
2026-06-07 18:30 ` [PATCH v14 net-next 07/13] dpll: balance create/delete notifications in __dpll_pin_(un)register Grzegorz Nitka
2026-06-08 16:35   ` Kubalewski, Arkadiusz
2026-06-07 18:30 ` [PATCH v14 net-next 08/13] dpll: extend pin notifier with notification source ID Grzegorz Nitka
2026-06-07 18:30 ` Grzegorz Nitka [this message]
2026-06-07 18:30 ` [PATCH v14 net-next 10/13] ice: introduce TXC DPLL device and TX ref clock pin framework for E825 Grzegorz Nitka
2026-06-07 18:30 ` [PATCH v14 net-next 11/13] ice: implement CPI support for E825C Grzegorz Nitka
2026-06-07 18:30 ` [PATCH v14 net-next 12/13] ice: add Tx reference clock index handling to AN restart command Grzegorz Nitka
2026-06-07 18:30 ` [PATCH v14 net-next 13/13] ice: implement E825 TX ref clock control and TXC hardware sync status Grzegorz Nitka
2026-06-13 20:40 ` [PATCH v14 net-next 00/13] dpll/ice: Add generic DPLL type and full TX reference clock control for E825 patchwork-bot+netdevbpf

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=20260607183045.1213735-10-grzegorz.nitka@intel.com \
    --to=grzegorz.nitka@intel.com \
    --cc=Prathosh.Satish@microchip.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=ivecera@redhat.com \
    --cc=jiri@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=poros@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    /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

all inboxes | Powered by JetHome®