diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-06 09:30:37 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-06 09:30:37 +0200 |
commit | 579b794b5d13e4a1ffa21d2426bfab7050eaba9d (patch) | |
tree | fb7aec42846fb17498f1371363f474691fdbf4d4 /include | |
parent | 646a0d058dd206ee978803aaeb53c886cbc5ad9f (diff) | |
parent | 32dc070fd499a8a0bc4bc434fe74319c7463a97a (diff) | |
download | barebox-579b794b5d13e4a1ffa21d2426bfab7050eaba9d.tar.gz barebox-579b794b5d13e4a1ffa21d2426bfab7050eaba9d.tar.xz |
Merge branch 'for-next/of'
Conflicts:
arch/arm/mach-imx/Makefile
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 10 | ||||
-rw-r--r-- | include/pinctrl.h | 35 |
2 files changed, 42 insertions, 3 deletions
diff --git a/include/of.h b/include/of.h index 94ccfd8739..4dcf37e140 100644 --- a/include/of.h +++ b/include/of.h @@ -26,6 +26,7 @@ struct device_node { struct list_head parent_list; struct list_head list; struct resource *resource; + int num_resource; struct device_d *device; struct list_head phandles; phandle phandle; @@ -160,6 +161,8 @@ void of_delete_property(struct property *pp); int of_property_read_string(struct device_node *np, const char *propname, const char **out_string); +int of_property_read_string_index(struct device_node *np, const char *propname, + int index, const char **output); int of_set_property(struct device_node *node, const char *p, const void *val, int len, int create); struct device_node *of_create_node(struct device_node *root, const char *path); @@ -167,9 +170,10 @@ struct device_node *of_create_node(struct device_node *root, const char *path); struct device_node *of_get_root_node(void); int of_set_root_node(struct device_node *); +struct cdev; + #ifdef CONFIG_OFTREE -int of_parse_partitions(const char *cdevname, - struct device_node *node); +int of_parse_partitions(struct cdev *cdev, struct device_node *node); int of_alias_get_id(struct device_node *np, const char *stem); int of_device_is_stdout_path(struct device_d *dev); @@ -177,7 +181,7 @@ const char *of_get_model(void); void *of_flatten_dtb(struct device_node *node); int of_add_memory(struct device_node *node, bool dump); #else -static inline int of_parse_partitions(const char *cdevname, +static inline int of_parse_partitions(struct cdev *cdev, struct device_node *node) { return -EINVAL; diff --git a/include/pinctrl.h b/include/pinctrl.h new file mode 100644 index 0000000000..7323f8b2f2 --- /dev/null +++ b/include/pinctrl.h @@ -0,0 +1,35 @@ +#ifndef PINCTRL_H +#define PINCTRL_H + +struct pinctrl_device; + +struct pinctrl_ops { + int (*set_state)(struct pinctrl_device *, struct device_node *); +}; + +struct pinctrl_device { + struct device_d *dev; + struct pinctrl_ops *ops; + struct list_head list; + struct device_node *node; +}; + +int pinctrl_register(struct pinctrl_device *pdev); +void pinctrl_unregister(struct pinctrl_device *pdev); + +#ifdef CONFIG_PINCTRL +int pinctrl_select_state(struct device_d *dev, const char *state); +int pinctrl_select_state_default(struct device_d *dev); +#else +static inline int pinctrl_select_state(struct device_d *dev, const char *state) +{ + return -ENODEV; +} + +static inline int pinctrl_select_state_default(struct device_d *dev) +{ + return -ENODEV; +} +#endif + +#endif /* PINCTRL_H */ |