A little something on Linux Device Drivers

Posted on September 5, 2012
Tags: ,
by Sanchayan Maity

I have been struggling for a while now, trying to learn device drivers and system programming in Linux. One of the many questions I had was, how does the CPU using the Linux kernel know, which devices are present and what are the drivers for them. The answer to this question is through “Platform Device and Platform Data”. Though soon enough, you may find them obsolete as Linux very well might completely start using Device Trees. Below, are a few links from which you can learn about the Platform Device API and Device Tree.

http://lwn.net/Articles/448499/

http://lxr.free-electrons.com/source/Documentation/driver-model/

http://www.devicetree.org/Device_Tree_Usage

You will find extra information at

http://lxr.free-electrons.com/source/Documentation/

under various sub divisions. For example, check out

http://lxr.free-electrons.com/source/Documentation/i2c/writing-clients

and

http://lxr.free-electrons.com/source/Documentation/i2c/instantiating-devices