summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dm/device.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 9948bd49fa..4e95fb7773 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -121,6 +121,16 @@ struct udevice {
/* Returns non-zero if the device is active (probed and not removed) */
#define device_active(dev) ((dev)->flags & DM_FLAG_ACTIVATED)
+static inline int dev_of_offset(const struct udevice *dev)
+{
+ return dev->of_offset;
+}
+
+static inline void dev_set_of_offset(struct udevice *dev, int of_offset)
+{
+ dev->of_offset = of_offset;
+}
+
/**
* struct udevice_id - Lists the compatible strings supported by a driver
* @compatible: Compatible string