linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: john.stultz@linaro.org (John Stultz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V12 4/4] ptp: Added a clock driver for the National Semiconductor PHYTER.
Date: Wed, 23 Mar 2011 14:46:25 -0700	[thread overview]
Message-ID: <1300916785.848.54.camel@work-vm> (raw)
In-Reply-To: <f8af215ebe32a8c0f4b3a82b8ee7e8008b4feb1e.1298878618.git.richard.cochran@omicron.at>

On Mon, 2011-02-28 at 08:58 +0100, Richard Cochran wrote:
> This patch adds support for the PTP clock found on the DP83640.
> The basic clock operations and one external time stamp have
> been implemented.

Just locking rule comment nits here.

> +static int tdr_write(int bc, struct phy_device *dev,
> +		     const struct timespec *ts, u16 cmd)
> +{
> +	ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_nsec & 0xffff);/* ns[15:0]  */
> +	ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_nsec >> 16);   /* ns[31:16] */
> +	ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_sec & 0xffff); /* sec[15:0] */
> +	ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_sec >> 16);    /* sec[31:16]*/
> +
> +	ext_write(bc, dev, PAGE4, PTP_CTL, cmd);
> +
> +	return 0;
> +}

The above needs to hold the extreg_lock, and should be commented as
such.

And again, the function names are sort of generic, and could use a
dp83640_ prefix or something.

thanks
-john

  reply	other threads:[~2011-03-23 21:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28  7:57 [PATCH V12 0/4] ptp: IEEE 1588 hardware clock support Richard Cochran
2011-02-28  7:57 ` [PATCH V12 1/4] ptp: Added a brand new class driver for ptp clocks Richard Cochran
2011-03-23 21:19   ` John Stultz
2011-03-26 13:12     ` Richard Cochran
2011-02-28  7:57 ` [PATCH V12 2/4] ptp: Added a clock that uses the eTSEC found on the MPC85xx Richard Cochran
2011-03-23 21:30   ` John Stultz
2011-03-26 13:23     ` Richard Cochran
2011-02-28  7:58 ` [PATCH V12 3/4] ptp: Added a clock driver for the IXP46x Richard Cochran
2011-03-13 23:40   ` Krzysztof Halasa
2011-03-23 21:43   ` John Stultz
2011-02-28  7:58 ` [PATCH V12 4/4] ptp: Added a clock driver for the National Semiconductor PHYTER Richard Cochran
2011-03-23 21:46   ` John Stultz [this message]
2011-03-26 13:40     ` Richard Cochran
2011-03-03 20:13 ` [PATCH V12 0/4] ptp: IEEE 1588 hardware clock support David Miller
2011-03-16 14:26 ` Richard Cochran
2011-03-19 10:14 ` Richard Cochran

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=1300916785.848.54.camel@work-vm \
    --to=john.stultz@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).