write a simple block device driver as module

write a simple block device driver as module

Post by Enno Welber » Mon, 06 Aug 2001 22:34:08



Hello out there!

I hope that this is the correct point for asking. I am new to developing
modules and read some documentation on linuxdoc.org on how to develop
modules. I am now able to write simple character device drivers, but nowhere
is documentation found on how to write block device drivers (as modules).
Can someone help me?

greetings,
Enno Welbers

 
 
 

1. I want to write a simple device driver module: where do I start?

I was hoping to get a pointer on writing a simple device driver module.
I want to monitor
and control the status of two fans on an intel D815EEA2 motherboard.
These are logged
and controlled by an SMSC chip
http://www.smsc.com/main/catalog/lpc47m13x.html
The complete chip manual is:
http://www.smsc.com/main/datasheets/lpc47m13x.pdf

These manuals describe the exact locations and function of the fan
control registers.
By reading these, one can find the fan rotation speed.  By writing them,
one can control
the fan speed.

I have written thousands of lines of C, but do not know how to write
even a simple kernel
module.  I need to know:

(a) how to read data from these registers
(b) how to write data to these registers
(c) how to create a /proc file system entry to report the register
contents and perhaps to control
       them.

If someone would be willing to help me get started, or to point me to
the right thing to read, it would
help.  Please don't just tell me to read the lm_sensors code.  I have
looked at it but don't know if
this is applicable (eg, is the LMC chip on the I2C bus) or where to
start.

Cheers,
    Bruce Allen

2. british summer time

3. Reference for writing raw block I/O device driver

4. Possible to optmiize kernel for MMX ?

5. Writing problem with a block device driver

6. Need help with Awk.

7. nbd driver for 2.5+: fix for module removal & new block device layer

8. TIMEZONE

9. Anyone have written devices/drivers/module on solaris 2.6?

10. Linux device driver (kernel module) written in C++

11. 2.5.46 reloading a block device module doesn't probe devices

12. how to coordinate ioctl and block I/O requests in a block device driver

13. to write or not to write a BLASTED device driver