---
author: Sanchayan Maity
title: A little something on Linux Device Drivers
tags: device-driver, linux
---

<p style='text-align: justify;'>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.</p>

[http://lwn.net/Articles/448499/](http://lwn.net/Articles/448499/)

[http://lxr.free-electrons.com/source/Documentation/driver-model/](http://lxr.free-electrons.com/source/Documentation/driver-model/)

[http://www.devicetree.org/Device_Tree_Usage](http://www.devicetree.org/Device_Tree_Usage)

<p style='text-align: justify;'>You will find extra information at </p>

[http://lxr.free-electrons.com/source/Documentation/](http://lxr.free-electrons.com/source/Documentation/)

<p style='text-align: justify;'>under various sub divisions. For example, check out </p>

[http://lxr.free-electrons.com/source/Documentation/i2c/writing-clients](http://lxr.free-electrons.com/source/Documentation/i2c/writing-clients)

and

[http://lxr.free-electrons.com/source/Documentation/i2c/instantiating-devices](http://lxr.free-electrons.com/source/Documentation/i2c/instantiating-devices)
