1139804Simp#-
293835Stmm# Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
393835Stmm# All rights reserved.
493835Stmm#
593835Stmm# Redistribution and use in source and binary forms, with or without
693835Stmm# modification, are permitted provided that the following conditions
793835Stmm# are met:
893835Stmm# 1. Redistributions of source code must retain the above copyright
993835Stmm#    notice, this list of conditions and the following disclaimer.
1093835Stmm# 2. Redistributions in binary form must reproduce the above copyright
1193835Stmm#    notice, this list of conditions and the following disclaimer in the
1293835Stmm#    documentation and/or other materials provided with the distribution.
1393835Stmm#
1493835Stmm# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1593835Stmm# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1693835Stmm# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1793835Stmm# IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
1893835Stmm# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1993835Stmm# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2093835Stmm# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2193835Stmm# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2293835Stmm# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
2393835Stmm# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2493835Stmm#
2593835Stmm# $FreeBSD$
2693835Stmm
2793835Stmm#include <sys/bus.h>
2893835Stmm#include <sys/time.h>
2993835Stmm
3093835StmmINTERFACE clock;
3193835Stmm
3293835Stmm# Interface for clock drivers. This is inspired by the NetBSD device-independent
3393835Stmm# clock code (by Gordon W. Ross).
3493835Stmm
3593835Stmm# An EINVAL error return from this call signifies that the clock has an illegal
3693835Stmm# setting.
3793835StmmMETHOD int gettime {
3893835Stmm	device_t dev;
3993835Stmm	struct timespec *ts;
4093835Stmm};
4193835Stmm
4293835StmmMETHOD int settime {
4393835Stmm	device_t dev;
4493835Stmm	struct timespec *ts;
4593835Stmm};
46