Skip Navigation Links | |
Exit Print View | |
Device Driver Tutorial Oracle Solaris 11.1 Information Library |
1. Introduction to Device Drivers
Overview of the Template Driver Example
Writing the Loadable Module Configuration Entry Points
Declaring the Loadable Module Configuration Entry Points
Defining the Module Initialization Entry Point
Defining the Module Information Entry Point
Defining the Module Unload Entry Point
Including Loadable Module Configuration Header Files
Writing the Autoconfiguration Entry Points
Declaring the Autoconfiguration Entry Points
Defining the Device Attach Entry Point
Defining the Device Detach Entry Point
Defining the Get Driver Information Entry Point
Defining the Report Driver Property Information Entry Point
Including Autoconfiguration Header Files
Writing the User Context Entry Points
Declaring the User Context Entry Points
Defining the Open Device Entry Point
Defining the Close Device Entry Point
Defining the Read Device Entry Point
Defining the Write Device Entry Point
Including User Context Header Files
Writing the Driver Data Structures
Defining the Character and Block Operations Structure
Defining the Device Operations Structure
Defining the Module Linkage Structures
Including Data Structures Header Files
Building and Installing the Template Driver
Reading and Writing the Device
Complete Template Driver Source
3. Reading and Writing Data in Kernel Memory
This driver requires a configuration file. The minimum information that a configuration file must contain is the name of the device node and the name or type of the device's parent. In this simple example, the node name of the device is the same as the file name of the driver. Create a file named dummy.conf in your working directory. Put the following single line of information into dummy.conf:
name="dummy" parent="pseudo";