Joe Vince
Joe Vince

Reputation: 355

How the traditional device driver program differs?

How the traditional device driver program differs from writing a device driver that support Device Tree ?

Upvotes: 0

Views: 81

Answers (1)

user656347
user656347

Reputation:

In the Linux kernel before device trees were introduced data required by drivers was provided through board files and there would be a board file for each possible board. It was provided from something called as platform data and drivers would be platform driver which are drivers basically not discoverable automatically or enumerated like USB or PCI.

The above approach resulted in a lot of mess and duplication as a lot of the data would of course be common or could be common between boards. For example, a GPIO controller for a particular SoC is not going to be different between boards or require different information at least not primary ones like interrupt id.

Device trees approach have a SoC level dtsi file which is common and all board or module variants inherit them but specify what any differences or additional peripherals to turn off or on.

Functions to parse or read either of them are different. Device trees describe hardware and the primary difference in both of them is how the data is provided and read.

Upvotes: 0

Related Questions