.\" 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 "PARPORT_REGISTER_PORT" "" "06 October 2005" "" ""
.SH NAME
parport_register_port \- register a parallel port
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
struct parport * parport_register_port (unsigned long \fIbase\fB, int \fIirq\fB, int \fIdma\fB, struct parport_operations * \fIops\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIbase\fB\fR
base I/O address
.TP
\fB\fIirq\fB\fR
IRQ line
.TP
\fB\fIdma\fB\fR
DMA channel
.TP
\fB\fIops\fB\fR
pointer to the port driver's port operations structure
.SH "DESCRIPTION"
.PP
When a parallel port (lowlevel) driver finds a port that
should be made available to parallel port device drivers, it
should call \fBparport_register_port\fR\&. The \fIbase\fR, \fIirq\fR, and
\fIdma\fR parameters are for the convenience of port drivers, and
for ports where they aren't meaningful needn't be set to
anything special. They can be altered afterwards by adjusting
the relevant members of the parport structure that is returned
and represents the port. They should not be tampered with
after calling parport_announce_port, however.
.PP
If there are parallel port device drivers in the system that
have registered themselves using \fBparport_register_driver\fR,
they are not told about the port at this time; that is done by
\fBparport_announce_port\fR\&.
.PP
The \fIops\fR structure is allocated by the caller, and must not be
deallocated before calling \fBparport_unregister_port\fR\&.
.PP
If there is no memory to allocate a new parport structure,
this function will return NULL\&.