diff options
Diffstat (limited to 'xen/include/asm-arm/device.h')
-rw-r--r-- | xen/include/asm-arm/device.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h index ed043441ca..60109cc95b 100644 --- a/xen/include/asm-arm/device.h +++ b/xen/include/asm-arm/device.h @@ -8,6 +8,8 @@ enum device_type { DEVICE_SERIAL, DEVICE_IOMMU, + /* Use for error */ + DEVICE_UNKNOWN, }; struct device_desc { @@ -32,6 +34,14 @@ struct device_desc { int __init device_init(struct dt_device_node *dev, enum device_type type, const void *data); +/** + * device_get_type - Get the type of the device + * @dev: device to match + * + * Return the device type on success or DEVICE_ANY on failure + */ +enum device_type device_get_type(const struct dt_device_node *dev); + #define DT_DEVICE_START(_name, _namestr, _type) \ static const struct device_desc __dev_desc_##_name __used \ __attribute__((__section__(".dev.info"))) = { \ |