-
Notifications
You must be signed in to change notification settings - Fork 25
Data structures
The project is under development and new structure will be added and/or older structures will be modified. As of now, following structure are defined in the parallel_interface.h header file :
struct pi_device_id {
char name[PI_NAME_SIZE];
kernel_ulong_t driver_data;
};
-
pi_device_id Structure to be used in a device-driver to supply the device id used to match a device.
@name The name of the device that needs to be matched with the driver. @driver_data The device specific data that will be needed by the device driver once its matched
| Definition |
struct pi_bus_host {
struct device dev;
};
-
pi_bus_host The structure to be used for bus host device.
@dev The device member of the structure.
| Definition |
struct pi_device {
struct pi_bus_host *pibushost;
char modalias[PI_MODALIAS_LENGTH];
struct device dev;
};
-
pi_device The structure to be used for a client device on the pi bus.
@pibushost The bus host device to which the client device is connected. @modalias The modalias value associated with the device node. @dev The member device of the pi_device structure.
| Definition |
struct pi_driver {
const struct pi_device_id *id_table;
struct device_driver driver;
int (*probe)(struct pi_device *dev);
void (*remove)(struct pi_device *dev);
void (*callback)(struct pi_device *, void *, int, void *, u32);
};
pi_driver The structure to be used by the device-driver to register
itself as a device driver onto the pi-bus.
@id_table The table containing ids of the device supported by the device
driver.
@driver The device_driver member of the pi_driver structure.
@probe The device driver probe method.
@remove The device driver remove method.
@callback The device driver callback method that will be called when
there is some data from the device for the driver.
| Definition |