title: Difference between uart_register_driver and platform_driver_register?
body: <p>I am studying UART Driver in kernel code and want to know, who first comes into picture, <code>device_register()</code> or <code>driver_register()</code> call?</p>
  
  <p>For difference between them follow <a href="https://stackoverflow.com/questions/22809480/sdifference-between-device-register-and-driver-register">this</a>.</p>
  
  <p>and in UART probing, we call </p>
  
  <pre class="lang-c prettyprint-override"><code>uart_register_driver(struct uart_driver *drv)
  </code></pre>
  
  <p>and after successfully registration,</p>
  
  <pre class="lang-c prettyprint-override"><code>uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
  </code></pre>
  
  <p>Please explain this in details.</p>