summaryrefslogtreecommitdiffstats
path: root/include/driver.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-11-25 15:39:11 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-11-27 10:42:54 +0100
commitf92f309c54996e0b4d09953820919161fbecac1d (patch)
tree4cdd66efc24941724fb7b2dbcd865037e8071035 /include/driver.h
parent54f55d79d92986477c08791fe8cbdef32e3eae6f (diff)
downloadbarebox-f92f309c54996e0b4d09953820919161fbecac1d.tar.gz
barebox-f92f309c54996e0b4d09953820919161fbecac1d.tar.xz
device: Add functions to add resources
We currently have functions to add a device based on function parameters. This adds the corresponding functions to add resources to a device without registering the device itself. This is useful to manipulate devices before registering them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/driver.h')
-rw-r--r--include/driver.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h
index 7f0532e1a6..bbe789b51e 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -229,6 +229,15 @@ void *dev_get_mem_region(struct device_d *dev, int num);
*/
void __iomem *dev_request_mem_region(struct device_d *dev, int num);
+struct device_d *device_alloc(const char *devname, int id);
+
+int device_add_resources(struct device_d *dev, const struct resource *res, int num);
+
+int device_add_resource(struct device_d *dev, const char *resname,
+ resource_size_t start, resource_size_t size, unsigned int flags);
+
+int device_add_data(struct device_d *dev, void *data, size_t size);
+
/*
* register a generic device
* with only one resource