pinctrl: enhance mapping table to support pin config operations
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / pinctrl / pinconf.h
1 /*
2 * Internal interface between the core pin control system and the
3 * pin config portions
4 *
5 * Copyright (C) 2011 ST-Ericsson SA
6 * Written on behalf of Linaro for ST-Ericsson
7 * Based on bits of regulator core, gpio core and clk core
8 *
9 * Author: Linus Walleij <linus.walleij@linaro.org>
10 *
11 * License terms: GNU General Public License (GPL) version 2
12 */
13
14 #ifdef CONFIG_PINCONF
15
16 int pinconf_check_ops(struct pinctrl_dev *pctldev);
17
18 int pinconf_validate_map(struct pinctrl_map const *map, int i);
19
20 int pinconf_map_to_setting(struct pinctrl_map const *map,
21 struct pinctrl_setting *setting);
22 void pinconf_free_setting(struct pinctrl_setting const *setting);
23 int pinconf_apply_setting(struct pinctrl_setting const *setting);
24
25 void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map);
26 void pinconf_show_setting(struct seq_file *s,
27 struct pinctrl_setting const *setting);
28 void pinconf_init_device_debugfs(struct dentry *devroot,
29 struct pinctrl_dev *pctldev);
30
31 #else
32
33 static inline int pinconf_check_ops(struct pinctrl_dev *pctldev)
34 {
35 return 0;
36 }
37
38 static inline int pinconf_validate_map(struct pinctrl_map const *map, int i)
39 {
40 return 0;
41 }
42
43 static inline int pinconf_map_to_setting(struct pinctrl_map const *map,
44 struct pinctrl_setting *setting)
45 {
46 return 0;
47 }
48
49 static inline void pinconf_free_setting(struct pinctrl_setting const *setting)
50 {
51 }
52
53 static inline int pinconf_apply_setting(struct pinctrl_setting const *setting)
54 {
55 return 0;
56 }
57
58 static inline void pinconf_show_map(struct seq_file *s,
59 struct pinctrl_map const *map)
60 {
61 }
62
63 static inline void pinconf_show_setting(struct seq_file *s,
64 struct pinctrl_setting const *setting)
65 {
66 }
67
68 static inline void pinconf_init_device_debugfs(struct dentry *devroot,
69 struct pinctrl_dev *pctldev)
70 {
71 }
72
73 #endif