mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
Cc: Piergiorgio Beruto <Pier.Beruto@onsemi.com>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2 8/9] onsemi: s2500: Add driver support for TS2500 MAC-PHY
Date: Mon, 18 May 2026 14:00:49 +0200	[thread overview]
Message-ID: <660d68f2-2e4a-4dad-a33b-9cbd1847c04e@lunn.ch> (raw)
In-Reply-To: <CY8PR02MB9249BE304350D2FA7C196A6C83032@CY8PR02MB9249.namprd02.prod.outlook.com>

On Mon, May 18, 2026 at 04:03:38AM +0000, Selvamani Rajagopal wrote:
> 
> 
> 
> > > +static int s2500_hwtstamp_get(struct net_device *ndev,
> > > + struct kernel_hwtstamp_config *cfg)
> > > +{
> > > + struct s2500_info *priv = netdev_priv(ndev);
> > > +
> > > + if (!priv->ptp_clock) {
> > > + cfg->tx_type = 0;
> > > + cfg->rx_filter = 0;
> > > + } else {
> > > + oa_tc6_hwtstamp_get(priv->tc6, cfg);
> > > + }
> > > + return 0;
> > 
> > What is actually specific to the s2500 here? Your aim should be to put
> > everything you can into the core.
> 
> I agree on this and the next comment as well. Nothing really vendor specific. 
> 
> Question is, 
> 1) Should we add the PTP code in oa_tc6.c? This PTP code add 200+ lines. My preference is to add a new file oa_tc6_ptp.c under the directory where oa_tc6.c resides.

oa_tc6_ptp.c is good. Maybe create a directory oa_tc6 and move the
code into there. Especially if you need to add a local header which is
shared by oa_tc6.c and oa_tc6_ptp.c, but is not needed by the drivers.

> 2) If we are adding a new file, should it be under same CONFIG_OA_TC6 or add a new CONFIG_OA_TC6_HW_TIMESTAMP or something similar?

I would not bother with a new symbol. It adds build testing complexity
having to build with and without it, to test the stubs are correct
etc.

	Andrew

  reply	other threads:[~2026-05-18 12:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 18:19 Selvamani Rajagopal
2026-05-11 20:12 ` Andrew Lunn
2026-05-18  4:03   ` Selvamani Rajagopal
2026-05-18 12:00     ` Andrew Lunn [this message]
2026-05-21 17:51       ` Selvamani Rajagopal
2026-05-21 18:52         ` Andrew Lunn
2026-05-21 21:01           ` Selvamani Rajagopal
2026-05-11 20:18 ` Andrew Lunn
2026-05-11 20:31   ` Selvamani Rajagopal

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=660d68f2-2e4a-4dad-a33b-9cbd1847c04e@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Pier.Beruto@onsemi.com \
    --cc=Selvamani.Rajagopal@onsemi.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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®