summaryrefslogtreecommitdiff
path: root/include/dm
diff options
context:
space:
mode:
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/device-internal.h16
-rw-r--r--include/dm/device.h20
-rw-r--r--include/dm/lists.h4
-rw-r--r--include/dm/root.h4
-rw-r--r--include/dm/test.h12
-rw-r--r--include/dm/uclass-internal.h10
-rw-r--r--include/dm/uclass.h18
7 files changed, 42 insertions, 42 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index c026e8e..ea3df36 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -11,7 +11,7 @@
#ifndef _DM_DEVICE_INTERNAL_H
#define _DM_DEVICE_INTERNAL_H
-struct device;
+struct udevice;
/**
* device_bind() - Create a device and bind it to a driver
@@ -34,9 +34,9 @@ struct device;
* @devp: Returns a pointer to the bound device
* @return 0 if OK, -ve on error
*/
-int device_bind(struct device *parent, struct driver *drv,
+int device_bind(struct udevice *parent, struct driver *drv,
const char *name, void *platdata, int of_offset,
- struct device **devp);
+ struct udevice **devp);
/**
* device_bind_by_name: Create a device and bind it to a driver
@@ -49,8 +49,8 @@ int device_bind(struct device *parent, struct driver *drv,
* @devp: Returns a pointer to the bound device
* @return 0 if OK, -ve on error
*/
-int device_bind_by_name(struct device *parent, const struct driver_info *info,
- struct device **devp);
+int device_bind_by_name(struct udevice *parent, const struct driver_info *info,
+ struct udevice **devp);
/**
* device_probe() - Probe a device, activating it
@@ -61,7 +61,7 @@ int device_bind_by_name(struct device *parent, const struct driver_info *info,
* @dev: Pointer to device to probe
* @return 0 if OK, -ve on error
*/
-int device_probe(struct device *dev);
+int device_probe(struct udevice *dev);
/**
* device_remove() - Remove a device, de-activating it
@@ -72,7 +72,7 @@ int device_probe(struct device *dev);
* @dev: Pointer to device to remove
* @return 0 if OK, -ve on error (an error here is normally a very bad thing)
*/
-int device_remove(struct device *dev);
+int device_remove(struct udevice *dev);
/**
* device_unbind() - Unbind a device, destroying it
@@ -82,6 +82,6 @@ int device_remove(struct device *dev);
* @dev: Pointer to device to unbind
* @return 0 if OK, -ve on error
*/
-int device_unbind(struct device *dev);
+int device_unbind(struct udevice *dev);
#endif
diff --git a/include/dm/device.h b/include/dm/device.h
index 4cd38ed..ec04982 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -24,7 +24,7 @@ struct driver_info;
#define DM_FLAG_ALLOC_PDATA (2 << 0)
/**
- * struct device - An instance of a driver
+ * struct udevice - An instance of a driver
*
* This holds information about a device, which is a driver bound to a
* particular port or peripheral (essentially a driver instance).
@@ -53,12 +53,12 @@ struct driver_info;
* @sibling_node: Next device in list of all devices
* @flags: Flags for this device DM_FLAG_...
*/
-struct device {
+struct udevice {
struct driver *driver;
const char *name;
void *platdata;
int of_offset;
- struct device *parent;
+ struct udevice *parent;
void *priv;
struct uclass *uclass;
void *uclass_priv;
@@ -122,11 +122,11 @@ struct driver {
char *name;
enum uclass_id id;
const struct device_id *of_match;
- int (*bind)(struct device *dev);
- int (*probe)(struct device *dev);
- int (*remove)(struct device *dev);
- int (*unbind)(struct device *dev);
- int (*ofdata_to_platdata)(struct device *dev);
+ int (*bind)(struct udevice *dev);
+ int (*probe)(struct udevice *dev);
+ int (*remove)(struct udevice *dev);
+ int (*unbind)(struct udevice *dev);
+ int (*ofdata_to_platdata)(struct udevice *dev);
int priv_auto_alloc_size;
int platdata_auto_alloc_size;
const void *ops; /* driver-specific operations */
@@ -144,7 +144,7 @@ struct driver {
* @dev Device to check
* @return platform data, or NULL if none
*/
-void *dev_get_platdata(struct device *dev);
+void *dev_get_platdata(struct udevice *dev);
/**
* dev_get_priv() - Get the private data for a device
@@ -154,6 +154,6 @@ void *dev_get_platdata(struct device *dev);
* @dev Device to check
* @return private data, or NULL if none
*/
-void *dev_get_priv(struct device *dev);
+void *dev_get_priv(struct udevice *dev);
#endif
diff --git a/include/dm/lists.h b/include/dm/lists.h
index 0d09f9a..7feba4b 100644
--- a/include/dm/lists.h
+++ b/include/dm/lists.h
@@ -32,8 +32,8 @@ struct driver *lists_driver_lookup_name(const char *name);
*/
struct uclass_driver *lists_uclass_lookup(enum uclass_id id);
-int lists_bind_drivers(struct device *parent);
+int lists_bind_drivers(struct udevice *parent);
-int lists_bind_fdt(struct device *parent, const void *blob, int offset);
+int lists_bind_fdt(struct udevice *parent, const void *blob, int offset);
#endif
diff --git a/include/dm/root.h b/include/dm/root.h
index 0ebccda..3018bc8 100644
--- a/include/dm/root.h
+++ b/include/dm/root.h
@@ -10,7 +10,7 @@
#ifndef _DM_ROOT_H_
#define _DM_ROOT_H_
-struct device;
+struct udevice;
/**
* dm_root() - Return pointer to the top of the driver tree
@@ -19,7 +19,7 @@ struct device;
*
* @return pointer to root device, or NULL if not inited yet
*/
-struct device *dm_root(void);
+struct udevice *dm_root(void);
/**
* dm_scan_platdata() - Scan all platform data and bind drivers
diff --git a/include/dm/test.h b/include/dm/test.h
index eeaa2eb..409f1a3 100644
--- a/include/dm/test.h
+++ b/include/dm/test.h
@@ -30,7 +30,7 @@ struct dm_test_pdata {
* @return 0 if OK, -ve on error
*/
struct test_ops {
- int (*ping)(struct device *dev, int pingval, int *pingret);
+ int (*ping)(struct udevice *dev, int pingval, int *pingret);
};
/* Operations that our test driver supports */
@@ -102,8 +102,8 @@ extern struct dm_test_state global_test_state;
* @skip_post_probe: Skip uclass post-probe processing
*/
struct dm_test_state {
- struct device *root;
- struct device *testdev;
+ struct udevice *root;
+ struct udevice *testdev;
int fail_count;
int force_fail_alloc;
int skip_post_probe;
@@ -138,8 +138,8 @@ struct dm_test {
}
/* Declare ping methods for the drivers */
-int test_ping(struct device *dev, int pingval, int *pingret);
-int testfdt_ping(struct device *dev, int pingval, int *pingret);
+int test_ping(struct udevice *dev, int pingval, int *pingret);
+int testfdt_ping(struct udevice *dev, int pingval, int *pingret);
/**
* dm_check_operations() - Check that we can perform ping operations
@@ -152,7 +152,7 @@ int testfdt_ping(struct device *dev, int pingval, int *pingret);
* @priv: Pointer to private test information
* @return 0 if OK, -ve on error
*/
-int dm_check_operations(struct dm_test_state *dms, struct device *dev,
+int dm_check_operations(struct dm_test_state *dms, struct udevice *dev,
uint32_t base, struct dm_test_priv *priv);
/**
diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index cc65d52..1434db3 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -21,7 +21,7 @@
* @return the uclass pointer of a child at the given index or
* return NULL on error.
*/
-int uclass_find_device(enum uclass_id id, int index, struct device **devp);
+int uclass_find_device(enum uclass_id id, int index, struct udevice **devp);
/**
* uclass_bind_device() - Associate device with a uclass
@@ -31,7 +31,7 @@ int uclass_find_device(enum uclass_id id, int index, struct device **devp);
* @dev: Pointer to the device
* #return 0 on success, -ve on error
*/
-int uclass_bind_device(struct device *dev);
+int uclass_bind_device(struct udevice *dev);
/**
* uclass_unbind_device() - Deassociate device with a uclass
@@ -41,7 +41,7 @@ int uclass_bind_device(struct device *dev);
* @dev: Pointer to the device
* #return 0 on success, -ve on error
*/
-int uclass_unbind_device(struct device *dev);
+int uclass_unbind_device(struct udevice *dev);
/**
* uclass_post_probe_device() - Deal with a device that has just been probed
@@ -52,7 +52,7 @@ int uclass_unbind_device(struct device *dev);
* @dev: Pointer to the device
* #return 0 on success, -ve on error
*/
-int uclass_post_probe_device(struct device *dev);
+int uclass_post_probe_device(struct udevice *dev);
/**
* uclass_pre_remove_device() - Handle a device which is about to be removed
@@ -62,7 +62,7 @@ int uclass_post_probe_device(struct device *dev);
* @dev: Pointer to the device
* #return 0 on success, -ve on error
*/
-int uclass_pre_remove_device(struct device *dev);
+int uclass_pre_remove_device(struct udevice *dev);
/**
* uclass_find() - Find uclass by its id
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index cd23cfe..931d9c0 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -37,7 +37,7 @@ struct uclass {
struct list_head sibling_node;
};
-struct device;
+struct udevice;
/**
* struct uclass_driver - Driver for the uclass
@@ -65,10 +65,10 @@ struct device;
struct uclass_driver {
const char *name;
enum uclass_id id;
- int (*post_bind)(struct device *dev);
- int (*pre_unbind)(struct device *dev);
- int (*post_probe)(struct device *dev);
- int (*pre_remove)(struct device *dev);
+ int (*post_bind)(struct udevice *dev);
+ int (*pre_unbind)(struct udevice *dev);
+ int (*post_probe)(struct udevice *dev);
+ int (*pre_remove)(struct udevice *dev);
int (*init)(struct uclass *class);
int (*destroy)(struct uclass *class);
int priv_auto_alloc_size;
@@ -101,7 +101,7 @@ int uclass_get(enum uclass_id key, struct uclass **ucp);
* @ucp: Returns pointer to uclass (there is only one per for each ID)
* @return 0 if OK, -ve on error
*/
-int uclass_get_device(enum uclass_id id, int index, struct device **ucp);
+int uclass_get_device(enum uclass_id id, int index, struct udevice **ucp);
/**
* uclass_first_device() - Get the first device in a uclass
@@ -110,7 +110,7 @@ int uclass_get_device(enum uclass_id id, int index, struct device **ucp);
* @devp: Returns pointer to the first device in that uclass, or NULL if none
* @return 0 if OK (found or not found), -1 on error
*/
-int uclass_first_device(enum uclass_id id, struct device **devp);
+int uclass_first_device(enum uclass_id id, struct udevice **devp);
/**
* uclass_next_device() - Get the next device in a uclass
@@ -119,7 +119,7 @@ int uclass_first_device(enum uclass_id id, struct device **devp);
* to the next device in the same uclass, or NULL if none
* @return 0 if OK (found or not found), -1 on error
*/
-int uclass_next_device(struct device **devp);
+int uclass_next_device(struct udevice **devp);
/**
* uclass_foreach_dev() - Helper function to iteration through devices
@@ -127,7 +127,7 @@ int uclass_next_device(struct device **devp);
* This creates a for() loop which works through the available devices in
* a uclass in order from start to end.
*
- * @pos: struct device * to hold the current device. Set to NULL when there
+ * @pos: struct udevice * to hold the current device. Set to NULL when there
* are no more devices.
* uc: uclass to scan
*/