diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-08-06 09:12:34 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-08-14 15:00:41 -0400 |
commit | e81c8f18afc4fdd6e34d8c83814b8b5134dbb30f (patch) | |
tree | 59435df0785247baed2bfe63bbd10a32c3769e60 /include/linux/pinctrl | |
parent | 1eb207a9ecaafb980704d8bc055a9a0269f62f8e (diff) |
pinctrl: pinconf-generic: add generic APIs for mapping pinctrl node
Add generic APIs to map the DT node and its sub node in pinconf generic
driver. These APIs can be used from driver to parse the DT node who
uses the pinconf generic APIs for defining their nodes.
Changes from V1:
- Add generic property for pins and functions in pinconf-generic.
- Add APIs to map the DT and subnode.
- Move common utils APIs to the pinctrl-utils from this file.
- Update the binding document accordingly.
Changes from V2:
- Rebased the pinctrl binding doc on top of Stephen's cleanup.
- Rename properties "pinctrl-pins" and "pinctrl-function" to
"pins" and "function".
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/pinctrl')
-rw-r--r-- | include/linux/pinctrl/pinconf-generic.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index bf7e989abcb5..a472b93292a3 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h | |||
@@ -137,6 +137,12 @@ static inline unsigned long pinconf_to_config_packed(enum pin_config_param param | |||
137 | return PIN_CONF_PACKED(param, argument); | 137 | return PIN_CONF_PACKED(param, argument); |
138 | } | 138 | } |
139 | 139 | ||
140 | int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev, | ||
141 | struct device_node *np, struct pinctrl_map **map, | ||
142 | unsigned *reserved_maps, unsigned *num_maps); | ||
143 | int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev, | ||
144 | struct device_node *np_config, struct pinctrl_map **map, | ||
145 | unsigned *num_maps); | ||
140 | #endif /* CONFIG_GENERIC_PINCONF */ | 146 | #endif /* CONFIG_GENERIC_PINCONF */ |
141 | 147 | ||
142 | #endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */ | 148 | #endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */ |