driver methods for character device drivers and block device drivers, see [RUBN]. Chapter 3 describes the methods for character devices and chapter 6 describes the methods for block devices.

6.8.1.7.2.1Character Devices

Possible Character Device methods are:

llseek flush

read release

write fsync

readdir fasync

poll lock

ioctl readv

mmap writev

open owner

Other functions:

register_chrdev

unregister_chrdev

Linux Device Drivers, O’Reilly, Chapter 3, 2nd Edition June 2001, Alessandro Rubini

Linux Device Drivers, O’Reilly, Chapter 3, 2nd Edition June 2001, Alessandro Rubini

6.8.1.7.2.2Block Devices

Possible Block Device Methods are:

open

release

ioctl

check_media_change

revalidate

In addition to this, the programmer needs to define the device-specific function request(). Other functions include the following:

register_blkdev

unregister_blkdev

Linux Device Drivers, O’Reilly, Chapter 12, 2nd Edition June 2001, Alessandro Rubini

Linux Device Drivers, O’Reilly, Chapter 12, 2nd Edition June 2001, Alessandro Rubini

230

Page 242
Image 242
IBM 10 SP1 EAL4 manual Other functions