diff options
author | Heiko Stübner <heiko@sntech.de> | 2013-06-10 21:40:29 +0200 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:44:15 -0700 |
commit | fc4811a6acd74f37b58fd2e2a19ed63b8e86dc77 (patch) | |
tree | 24d230428aacb89e129291db2b31718a80ea618a /drivers/pinctrl/pinconf.h | |
parent | 07013c1df79aee8aa6725b96c00e3104ace010bf (diff) |
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 <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 7db9af4b6e41be599e0fcd50d687138a5add428c)
Change-Id: Ife82b86c851f354ee123cb520ea6c02ef9b025f8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/267328
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/pinctrl/pinconf.h')
-rw-r--r-- | drivers/pinctrl/pinconf.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |