views:

130

answers:

2

I started lately reading some articles about the kernel space and especially about device drivers. So I was wondering are there some minimal requirements for a device in order to make it easy to write a device driver for it?

+1  A: 

A possibility to communicate with it from the kernel (PCI, USB, etc...) and documentation. Obviously a kind of hardware debugging process can improve things.

David Schmitt
A: 

(This doesn't count as "minimal", but it does meet your desire to "make it easy".)

Some sort of testing mode, or device simulator, which allows you to

(a) see the messages that are being sent to it, so you can see when there is a bug in your code.

(b) stimulate events that cause communications to occur.

For example, if you are writing a driver for a burglar alarm, a way of triggering the device to send an alert from a window sensor, without having to actually throw a brick through a window.

Oddthinking