All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Antoine Tenart <antoine.tenart@bootlin.com>
Cc: davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com,
	hkallweit1@gmail.com, alexandre.belloni@bootlin.com,
	UNGLinuxDriver@microchip.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com,
	allan.nielsen@microchip.com, foss@0leil.net
Subject: Re: [PATCH net-next v4 6/8] net: phy: mscc: timestamping and PHC support
Date: Thu, 25 Jun 2020 06:22:26 -0700	[thread overview]
Message-ID: <20200625132226.GC2548@localhost> (raw)
In-Reply-To: <20200623143014.47864-7-antoine.tenart@bootlin.com>

On Tue, Jun 23, 2020 at 04:30:12PM +0200, Antoine Tenart wrote:
> @@ -978,9 +1483,32 @@ static int __vsc8584_init_ptp(struct phy_device *phydev)
>  
>  	vsc85xx_ts_eth_cmp1_sig(phydev);
>  
> +	vsc8531->mii_ts.rxtstamp = vsc85xx_rxtstamp;
> +	vsc8531->mii_ts.txtstamp = vsc85xx_txtstamp;
> +	vsc8531->mii_ts.hwtstamp = vsc85xx_hwtstamp;
> +	vsc8531->mii_ts.ts_info  = vsc85xx_ts_info;
> +	phydev->mii_ts = &vsc8531->mii_ts;
> +
> +	memcpy(&vsc8531->ptp->caps, &vsc85xx_clk_caps, sizeof(vsc85xx_clk_caps));
> +
> +	vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps,
> +						     &phydev->mdio.dev);
> +	if (IS_ERR(vsc8531->ptp->ptp_clock))
> +		return PTR_ERR(vsc8531->ptp->ptp_clock);

The ptp_clock_register() method can also return NULL:

 * Returns a valid pointer on success or PTR_ERR on failure.  If PHC
 * support is missing at the configuration level, this function
 * returns NULL, and drivers are expected to gracefully handle that
 * case separately.

Thanks,
Richard

  reply	other threads:[~2020-06-25 13:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 14:30 [PATCH net-next v4 0/8] net: phy: mscc: PHC and timestamping support Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 1/8] net: phy: add support for a common probe between shared PHYs Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 2/8] net: phy: mscc: fix copyright and author information in MACsec Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 3/8] net: phy: mscc: remove the TR CLK disable magic value Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 4/8] net: phy: mscc: take into account the 1588 block in MACsec init Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 5/8] net: phy: mscc: 1588 block initialization Antoine Tenart
2020-06-25 11:52   ` Dan Carpenter
2020-06-25 11:52     ` Dan Carpenter
2020-06-25 11:52     ` Dan Carpenter
2020-06-23 14:30 ` [PATCH net-next v4 6/8] net: phy: mscc: timestamping and PHC support Antoine Tenart
2020-06-25 13:22   ` Richard Cochran [this message]
2020-06-25 13:38     ` Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 7/8] dt-bindings: net: phy: vsc8531: document the load/save GPIO Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 8/8] MIPS: dts: ocelot: describe " Antoine Tenart
2020-06-24 21:33 ` [PATCH net-next v4 0/8] net: phy: mscc: PHC and timestamping support David Miller

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=20200625132226.GC2548@localhost \
    --to=richardcochran@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=allan.nielsen@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=foss@0leil.net \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.