title: Writing a device driver for Platform Bus in Embedded Systems?
body: <p>I have gone through some driver implementation in Linux Kernel Source and can see that these are the platform driver.</p>
  
  <pre><code>drivers/net/ethernet/smsc/smsc911x.c
  
    static struct platform_driver smc911x_driver = {
      .probe           = smc911x_drv_probe,
      .remove  = smc911x_drv_remove,
      .suspend         = smc911x_drv_suspend,
      .resume  = smc911x_drv_resume,
      .driver  = {
              .name    = CARDNAME,
              .owner  = THIS_MODULE,
      },
  };
  </code></pre>
  
  <p>Above is a driver for platform device(smsc based Ethernet controller) and platform devices are devices which are not probed automatically during system boot-up unlike legacy devices sitting on the pci bus.</p>
  
  <p>I guess this understanding of mine is OK here?</p>
  
  <p>Now when I say it is the platform devices, is it mean these devices(Ethernet Controller) are sitting on Platform bus and on ARM architecture default platform bus is AMBA.</p>
  
  <p>So when we solder the Ethernet controller on ARM based board it should be sit on or interfaced with AMBA bus?</p>
  
  <p>How Do we decide that driver we're going to write is Platform driver or Normal driver?   </p>