Xenomai  3.1
Driver management services

Analogy driver registration / unregistration. More...

Collaboration diagram for Driver management services:

Functions

int a4l_register_drv (struct a4l_driver *drv)
 Register an Analogy driver. More...
 
int a4l_unregister_drv (struct a4l_driver *drv)
 Unregister an Analogy driver. More...
 

Detailed Description

Analogy driver registration / unregistration.

In a common Linux char driver, the developer has to register a fops structure filled with callbacks for read / write / mmap / ioctl operations.

Analogy drivers do not have to implement read / write / mmap / ioctl functions, these procedures are implemented in the Analogy generic layer. Then, the transfers between user-space and kernel-space are already managed. Analogy drivers work with commands and instructions which are some kind of more dedicated read / write operations. And, instead of registering a fops structure, a Analogy driver must register some a4l_driver structure.

Function Documentation

◆ a4l_register_drv()

int a4l_register_drv ( struct a4l_driver drv)

Register an Analogy driver.

After initialising a driver structure, the driver must be made available so as to be attached.

Parameters
[in]drvDriver descriptor structure
Returns
0 on success, otherwise negative error code.

References a4l_driver::board_name, and rtdm_available().

◆ a4l_unregister_drv()

int a4l_unregister_drv ( struct a4l_driver drv)

Unregister an Analogy driver.

This function removes the driver descriptor from the Analogy driver list. The driver cannot be attached anymore.

Parameters
[in]drvDriver descriptor structure
Returns
0 on success, otherwise negative error code.

References a4l_driver::board_name.