Commit 92f17194 authored by Richard Cochran's avatar Richard Cochran Committed by David S. Miller

ptp: introduce get/set time methods with explicit 64 bit seconds.

Converting the PHC drivers over to the new methods is one step along the
way to making them ready for 2038.  Once all the drivers are up to date,
then the old methods will be removed.
Signed-off-by: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d482994f
...@@ -64,10 +64,16 @@ struct ptp_clock_request { ...@@ -64,10 +64,16 @@ struct ptp_clock_request {
* @adjtime: Shifts the time of the hardware clock. * @adjtime: Shifts the time of the hardware clock.
* parameter delta: Desired change in nanoseconds. * parameter delta: Desired change in nanoseconds.
* *
* @gettime: Reads the current time from the hardware clock. * @gettime: Reads the current time from the hardware clock. (deprecated)
* parameter ts: Holds the result. * parameter ts: Holds the result.
* *
* @settime: Set the current time on the hardware clock. * @settime: Set the current time on the hardware clock. (deprecated)
* parameter ts: Time value to set.
*
* @gettime64: Reads the current time from the hardware clock.
* parameter ts: Holds the result.
*
* @settime64: Set the current time on the hardware clock.
* parameter ts: Time value to set. * parameter ts: Time value to set.
* *
* @enable: Request driver to enable or disable an ancillary feature. * @enable: Request driver to enable or disable an ancillary feature.
...@@ -106,6 +112,8 @@ struct ptp_clock_info { ...@@ -106,6 +112,8 @@ struct ptp_clock_info {
int (*adjtime)(struct ptp_clock_info *ptp, s64 delta); int (*adjtime)(struct ptp_clock_info *ptp, s64 delta);
int (*gettime)(struct ptp_clock_info *ptp, struct timespec *ts); int (*gettime)(struct ptp_clock_info *ptp, struct timespec *ts);
int (*settime)(struct ptp_clock_info *ptp, const struct timespec *ts); int (*settime)(struct ptp_clock_info *ptp, const struct timespec *ts);
int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
int (*settime64)(struct ptp_clock_info *p, const struct timespec64 *ts);
int (*enable)(struct ptp_clock_info *ptp, int (*enable)(struct ptp_clock_info *ptp,
struct ptp_clock_request *request, int on); struct ptp_clock_request *request, int on);
int (*verify)(struct ptp_clock_info *ptp, unsigned int pin, int (*verify)(struct ptp_clock_info *ptp, unsigned int pin,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment