From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6044A24EA90 for ; Sat, 29 Nov 2025 19:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764446052; cv=none; b=N/iJ7TXfqYlcSE6bvF2SrugTB5Oq2htRapSf0brEkQefOQIB2VOasHy0wHpvIvkR2f5ybbNKQEIJR6YDaCkIWlyBWzQT2J/Ki4WgZJL9y8Yf26pJams/ZS9b5W4rt85XsMy4fgiQxzHfk1ImCAe4wU2KtfeAm4TJ0FOkZwDv+7g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764446052; c=relaxed/simple; bh=Hf5pChy6SqRiQU4wfzcgjo+naiBOdFrgBXSDT2sZuQQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bE6+qJ4wJcQK3q6KmOzG6KI+l3fF4YkxXOjZ076MNG2T0W3Pm+tgoBOSxw2CRvygLYu16MRLr4L0EffKY2bSPMixTWAHbVgufXnTDWECB5hCaXCegGxDbK29X94DYWzpCRUQfMoZDXui8hQZ6GqSZt92335kjpyh3L6mT15hWEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=fELkCnB/; arc=none smtp.client-ip=95.215.58.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="fELkCnB/" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1764446048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OK98pOCHgFJvWBYQWUiXPaF6mu5wBIrt8IFqqKs9vJY=; b=fELkCnB/298U9kfvyMjuiiOCRYSRFXtFfbc85J+Lq2EVMfhk69cb7mWZqqGlXu/l+6fIEP PjAFlcqI+ry0Wt8zuDSz/U3P7Dmx2oosOHAM37Hftj1g3pUhlLbXlXWN3qAalrhz6fC6Lj MQHUC+nQYb8olTpiKaH0Nw2lP4z/A0I= From: Vadim Fedorenko To: Andrew Lunn , Russell King , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Andrew Lunn Cc: Simon Horman , Vladimir Oltean , Jacob Keller , Kory Maincent , netdev@vger.kernel.org, Vadim Fedorenko Subject: [PATCH net-next v2 4/4] net: phy: microchip_rds_ptp: add HW timestamp configuration reporting Date: Sat, 29 Nov 2025 19:53:34 +0000 Message-ID: <20251129195334.985464-5-vadim.fedorenko@linux.dev> In-Reply-To: <20251129195334.985464-1-vadim.fedorenko@linux.dev> References: <20251129195334.985464-1-vadim.fedorenko@linux.dev> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT The driver stores HW timestamping configuration and can technically report it. Add callback to do it. Reviewed-by: Kory Maincent Signed-off-by: Vadim Fedorenko --- drivers/net/phy/microchip_rds_ptp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/phy/microchip_rds_ptp.c b/drivers/net/phy/microchip_rds_ptp.c index 6a7a0bb95301..ad066d66a467 100644 --- a/drivers/net/phy/microchip_rds_ptp.c +++ b/drivers/net/phy/microchip_rds_ptp.c @@ -476,6 +476,18 @@ static bool mchp_rds_ptp_rxtstamp(struct mii_timestamper *mii_ts, return true; } +static int mchp_rds_ptp_hwtstamp_get(struct mii_timestamper *mii_ts, + struct kernel_hwtstamp_config *config) +{ + struct mchp_rds_ptp_clock *clock = + container_of(mii_ts, struct mchp_rds_ptp_clock, + mii_ts); + config->tx_type = clock->hwts_tx_type; + config->rx_filter = clock->rx_filter; + + return 0; +} + static int mchp_rds_ptp_hwtstamp_set(struct mii_timestamper *mii_ts, struct kernel_hwtstamp_config *config, struct netlink_ext_ack *extack) @@ -1293,6 +1305,7 @@ struct mchp_rds_ptp_clock *mchp_rds_ptp_probe(struct phy_device *phydev, u8 mmd, clock->mii_ts.rxtstamp = mchp_rds_ptp_rxtstamp; clock->mii_ts.txtstamp = mchp_rds_ptp_txtstamp; clock->mii_ts.hwtstamp_set = mchp_rds_ptp_hwtstamp_set; + clock->mii_ts.hwtstamp_get = mchp_rds_ptp_hwtstamp_get; clock->mii_ts.ts_info = mchp_rds_ptp_ts_info; phydev->mii_ts = &clock->mii_ts; -- 2.47.3