parport_device_coords

Name

parport_device_coords --  convert canonical device number

Synopsis

int parport_device_coords (int devnum, int * parport, int * mux, int * daisy);

Arguments

devnum

device number

parport

pointer to storage for parallel port number

mux

pointer to storage for multiplexor port number

daisy

pointer to storage for daisy chain address

Description

This function converts a device number into its coordinates in terms of which parallel port in the system it is attached to, which multiplexor port it is attached to if there is a multiplexor on that port, and which daisy chain address it has if it is in a daisy chain.

The caller must allocate storage for parport, mux, and daisy.

If there is no device with the specified device number, -ENXIO is returned. Otherwise, the values pointed to by parport, mux, and daisy are set to the coordinates of the device, with -1 for coordinates with no value.

This function is not actually very useful, but this interface was suggested by IEEE 1284.3.