[Ksummit-2012-discuss] [ATTEND] Complex dependencies in device model

Matthew Garrett mjg59 at srcf.ucam.org
Wed Jun 20 17:29:39 UTC 2012


On Wed, Jun 20, 2012 at 11:23:50AM -0600, Stephen Warren wrote:

> Well, this only affects probe() right, not the body of the driver?

And the API for getting your resources and properties.

> On ARM, most drivers were historically platform devices, so use APIs
> such as platform_get_resource() to retrieve at least their basic
> platform data (IO/memory ranges, IRQs). When DT support was added,
> rather than recode all these drivers to parse this information out of
> DT, the DT core creates a platform_device for each DT node, and
> populates the same IO/memory range and IRQ data into the platform
> resources, so that drivers can run unchanged. Presumably a similar
> technique can be used for ACPI.

Not really - ACPI is a superset of the platform device functionality.

> Perhaps we can make APIs such as of_property_get() work with either DT
> or ACPI (or wholesale replace everything with equivalent functions with
> less OF-/DT-specific names, but have basically the same semantics).
> Creating a DT from ACPI would be somewhat equivalent here. Note: both
> these ideas have been mentioned before by people far more in the thick
> of this than me; I'm mainly just repeating it!

Yes, one approach would be to just move all of this to dt and provide an 
additional mechanism for the ACPI-specific functionality (method 
execution and notification should cover it).

-- 
Matthew Garrett | mjg59 at srcf.ucam.org


More information about the Ksummit-2012-discuss mailing list