.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "MMTIMER_IOCTL" "9" "09 October 2005" "" ""
.SH NAME
mmtimer_ioctl \- ioctl interface for /dev/mmtimer
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int mmtimer_ioctl (struct inode * \fIinode\fB, struct file * \fIfile\fB, unsigned int \fIcmd\fB, unsigned long \fIarg\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIinode\fB\fR
inode of the device
.TP
\fB\fIfile\fB\fR
file structure for the device
.TP
\fB\fIcmd\fB\fR
command to execute
.TP
\fB\fIarg\fB\fR
optional argument to command
.SH "DESCRIPTION"
.PP
Executes the command specified by \fIcmd\fR\&. Returns 0 for success, < 0 for
failure.
.SH "VALID COMMANDS"
.PP
.PP
MMTIMER_GETOFFSET - Should return the offset (relative to the start
of the page where the registers are mapped) for the counter in question.
.PP
MMTIMER_GETRES - Returns the resolution of the clock in femto (10^-15)
seconds
.PP
MMTIMER_GETFREQ - Copies the frequency of the clock in Hz to the address
specified by \fIarg\fR
.PP
MMTIMER_GETBITS - Returns the number of bits in the clock's counter
.PP
MMTIMER_MMAPAVAIL - Returns 1 if the registers can be mmap'd into userspace
.PP
MMTIMER_GETCOUNTER - Gets the current value in the counter and places it
in the address specified by \fIarg\fR\&.