- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8.2k
Description
With the merge of #30196 we need to convert any device object definitions that are based on a devicetree node to use DEVICE_DT_DEFINE instead of:
- DEVICE_DEFINE17 driver source files
- DEVICE_AND_API_INIT361 driver source files
The vast majority of these are for devices that are associated with a devicetree node.  Changing allows use of new API to access the device object directly via DEVICE_DT_GET()  rather than a runtime lookup through the label property, and provides access to additional common devicetree information like dependencies.
Examples of the sort of changes required include:
- 63043bc when instance macros based on iterating over devices are already used;
- cf33927 when interrupts require local direct access to the device before it is defined.
There will be remaining instances of DEVICE_DEFINE and/or DEVICE_AND_API_INIT for device objects that do not derive from devicetree, such as USB class instance devices like CDC_ACM.
Note
The role of this issue is solely to replace the macros used to define struct device objects when a device corresponds to a devicetree node.  It enables, but does not implement, changes in device references in driver from ones that use the label property.  As noted in #30536 that can only be done when all drivers in a given subsystem have been converted.