What is Device driver
----------------------------
All the system operation eventually maps to a physical device. All the device control operations are performed by code that is specific to the device being controlled.That code is called device driver.The kernel must have embedded in it a device driver for every peripheral present on the system from hard driver to keyboard.


In a simple way i can put the devie driver with a following example-

A hardware is identified as a file under /dev directory which gives a path to communicate to the hardware. Device driver is a program which provides communication between the device file and user space program.

  Imagine like this.. a example soundDriver.ko might be writtent to handle a device named /dev/sound ( this may be any type of hardware i.e soundcard) and user space program(mp3 player )will use the /dev/sound in their code to access the sound card.
So every time when the mp3 player code opens/write/reads the /dev/sound file, this soundDriver.ko program will do that work for that mp3 player.

      mp3 player ( open /dev/sound)  --- > Device driver ( access the /dev/sound file ) --- > Hardware card representing   /dev/sound
Hosted by www.Geocities.ws

1