From: Ahmad Byagowi <ahmadexp@gmail.com>
To: netdev@vger.kernel.org
Cc: andrew@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, linux-kernel@vger.kernel.org, olteanv@gmail.com,
pabeni@redhat.com, richardcochran@gmail.com
Subject: [PATCH net v7 1/7] net: dsa: sja1105: keep pin function on EXTTS disable
Date: Fri, 27 Nov 2026 11:22:56 -0800 [thread overview]
Message-ID: <20261127-timecard-driver-v7-1-ahmadexp@gmail.com> (raw)
In-Reply-To: <20261127-timecard-driver-v7-0-ahmadexp@gmail.com>
An EXTTS disable request programs the shared PTP_CLK pin as an input
even if the pin is driving periodic output. Select input mode only
when enabling EXTTS. Keep the existing disable and timer drain.
Developed with coding-assistant support during review and validation.
Fixes: 747e5eb31d59 ("net: dsa: sja1105: configure the PTP_CLK pin as EXT_TS or PER_OUT")
Signed-off-by: Ahmad Byagowi <ahmadexp@gmail.com>
---
drivers/net/dsa/sja1105/sja1105_ptp.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/dsa/sja1105/sja1105_ptp.c b/drivers/net/dsa/sja1105/sja1105_ptp.c
index 350f958dcb2a..da35805152e0 100644
--- a/drivers/net/dsa/sja1105/sja1105_ptp.c
+++ b/drivers/net/dsa/sja1105/sja1105_ptp.c
@@ -816,9 +816,11 @@ static int sja1105_extts_enable(struct sja1105_private *priv,
(extts->flags & PTP_EXTTS_EDGES) != PTP_EXTTS_EDGES)
return -EOPNOTSUPP;
- rc = sja1105_change_ptp_clk_pin_func(priv, PTP_PF_EXTTS);
- if (rc)
- return rc;
+ if (on) {
+ rc = sja1105_change_ptp_clk_pin_func(priv, PTP_PF_EXTTS);
+ if (rc)
+ return rc;
+ }
priv->ptp_data.extts_enabled = on;
base-commit: 4392bb809812ac79449cd0cf1f5e00469ee102d1
--
2.54.0 (Apple Git-157)
next prev parent reply other threads:[~2026-11-27 19:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 19:22 [PATCH net v7 0/7] ptp: fix OCP routes and SJA1105 pin direction Ahmad Byagowi
2026-11-27 19:22 ` Ahmad Byagowi [this message]
2026-11-27 19:22 ` [PATCH net v7 2/7] net: dsa: sja1105: keep pin function on PEROUT disable Ahmad Byagowi
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=20261127-timecard-driver-v7-1-ahmadexp@gmail.com \
--to=ahmadexp@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
/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®