From 7db9af4b6e41be599e0fcd50d687138a5add428c Mon Sep 17 00:00:00 2001 From: Heiko Stübner Date: Mon, 10 Jun 2013 21:40:29 +0200 Subject: pinctrl: add function to parse generic pinconfig properties from a dt node pinconf_generic_parse_dt_config() takes a node as input and generates an array of generic pinconfig values from the properties of this node. As I couldn't find a mechanism to count the number of properties of a node the function uses internally an array to accept one of parameter and copies the real present options to a smaller variable at its end. Signed-off-by: Heiko Stuebner Signed-off-by: Linus Walleij --- drivers/pinctrl/pinconf.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/pinctrl/pinconf.h') diff --git a/drivers/pinctrl/pinconf.h b/drivers/pinctrl/pinconf.h index 92c7267244d2..a4a5417e1413 100644 --- a/drivers/pinctrl/pinconf.h +++ b/drivers/pinctrl/pinconf.h @@ -123,3 +123,9 @@ static inline void pinconf_generic_dump_config(struct pinctrl_dev *pctldev, return; } #endif + +#if defined(CONFIG_GENERIC_PINCONF) && defined(CONFIG_OF) +int pinconf_generic_parse_dt_config(struct device_node *np, + unsigned long **configs, + unsigned int *nconfigs); +#endif -- cgit v1.2.3