aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/fwnode.h1
-rw-r--r--include/linux/property.h33
2 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h
index fc30b84b532a..0408545bce42 100644
--- a/include/linux/fwnode.h
+++ b/include/linux/fwnode.h
@@ -16,6 +16,7 @@ enum fwnode_type {
16 FWNODE_INVALID = 0, 16 FWNODE_INVALID = 0,
17 FWNODE_OF, 17 FWNODE_OF,
18 FWNODE_ACPI, 18 FWNODE_ACPI,
19 FWNODE_PDATA,
19}; 20};
20 21
21struct fwnode_handle { 22struct fwnode_handle {
diff --git a/include/linux/property.h b/include/linux/property.h
index 31dfd3db35d6..de8bdf417a35 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -131,4 +131,37 @@ static inline int fwnode_property_read_u64(struct fwnode_handle *fwnode,
131 return fwnode_property_read_u64_array(fwnode, propname, val, 1); 131 return fwnode_property_read_u64_array(fwnode, propname, val, 1);
132} 132}
133 133
134/**
135 * struct property_entry - "Built-in" device property representation.
136 * @name: Name of the property.
137 * @type: Type of the property.
138 * @nval: Number of items of type @type making up the value.
139 * @value: Value of the property (an array of @nval items of type @type).
140 */
141struct property_entry {
142 const char *name;
143 enum dev_prop_type type;
144 size_t nval;
145 union {
146 void *raw_data;
147 u8 *u8_data;
148 u16 *u16_data;
149 u32 *u32_data;
150 u64 *u64_data;
151 const char **str;
152 } value;
153};
154
155/**
156 * struct property_set - Collection of "built-in" device properties.
157 * @fwnode: Handle to be pointed to by the fwnode field of struct device.
158 * @properties: Array of properties terminated with a null entry.
159 */
160struct property_set {
161 struct fwnode_handle fwnode;
162 struct property_entry *properties;
163};
164
165void device_add_property_set(struct device *dev, struct property_set *pset);
166
134#endif /* _LINUX_PROPERTY_H_ */ 167#endif /* _LINUX_PROPERTY_H_ */