0

I have a doubt on the following scenario in device tree, could you please help.

We have a device node entry in the device tree and corresponding driver exists in the Kernel source, but actual device is not present on the board then what will happen? Will the driver build with the kernel source, if the driver builds then driver binding happens?

Thanks in advance.

user3693586
  • 1,227
  • 5
  • 18
  • 40
  • Welcome to Stack Overflow! Please read [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and also [what have you tried](http://mattgemmell.com/what-have-you-tried/). – Jason Aller May 31 '14 at 06:47
  • *"Will the driver build with the kernel source"* -- Compilation and linking during the build phase is totally under your control, and is independent of HW. During boot, the device driver's **probe()** routine should be able to detect that the HW does not exist, and perform an error exit. The device driver would not be installed, and booting continues. – sawdust Jun 02 '14 at 18:43

1 Answers1

1

If your device is actually not present in the board, and you want to keep the device node in the device tree structure. you should use status = "disabled" in your device node. This property tells that device is not currently available. In future whenever your device is available you can make this status = "ok".

And yes driver will be built always, only bindings won't happen, as there is no corresponding device exists.

Rahul
  • 1,607
  • 3
  • 23
  • 41