aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/devicetree.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@wwwdotorg.org>2012-03-23 12:29:46 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-04-18 07:53:10 -0400
commit57291ce295c0aca738dd284c4a9c591c09ebee71 (patch)
tree6e687f329e7adf08b5d7dcaa3d6616ff1a9b8c27 /drivers/pinctrl/devicetree.h
parentd26bc49fa401be2b71838b6a4b387196cd12a534 (diff)
pinctrl: core device tree mapping table parsing support
During pinctrl_get(), if the client device has a device tree node, look for the common pinctrl properties there. If found, parse the referenced device tree nodes, with the help of the pinctrl drivers, and generate mapping table entries from them. During pinctrl_put(), free any results of device tree parsing. Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/devicetree.h')
-rw-r--r--drivers/pinctrl/devicetree.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/pinctrl/devicetree.h b/drivers/pinctrl/devicetree.h
new file mode 100644
index 000000000000..760bc4960f58
--- /dev/null
+++ b/drivers/pinctrl/devicetree.h
@@ -0,0 +1,35 @@
1/*
2 * Internal interface to pinctrl device tree integration
3 *
4 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifdef CONFIG_OF
20
21void pinctrl_dt_free_maps(struct pinctrl *p);
22int pinctrl_dt_to_map(struct pinctrl *p);
23
24#else
25
26static inline int pinctrl_dt_to_map(struct pinctrl *p)
27{
28 return 0;
29}
30
31static inline void pinctrl_dt_free_maps(struct pinctrl *p)
32{
33}
34
35#endif