2 * Internal interface between the core pin control system and the
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
9 * Author: Linus Walleij <linus.walleij@linaro.org>
11 * License terms: GNU General Public License (GPL) version 2
16 int pinconf_check_ops(struct pinctrl_dev
*pctldev
);
17 int pinconf_validate_map(struct pinctrl_map
const *map
, int i
);
18 int pinconf_map_to_setting(struct pinctrl_map
const *map
,
19 struct pinctrl_setting
*setting
);
20 void pinconf_free_setting(struct pinctrl_setting
const *setting
);
21 int pinconf_apply_setting(struct pinctrl_setting
const *setting
);
22 void pinconf_show_map(struct seq_file
*s
, struct pinctrl_map
const *map
);
23 void pinconf_show_setting(struct seq_file
*s
,
24 struct pinctrl_setting
const *setting
);
25 void pinconf_init_device_debugfs(struct dentry
*devroot
,
26 struct pinctrl_dev
*pctldev
);
29 * You will only be interested in these if you're using PINCONF
30 * so don't supply any stubs for these.
32 int pin_config_get_for_pin(struct pinctrl_dev
*pctldev
, unsigned pin
,
33 unsigned long *config
);
34 int pin_config_group_get(const char *dev_name
, const char *pin_group
,
35 unsigned long *config
);
39 static inline int pinconf_check_ops(struct pinctrl_dev
*pctldev
)
44 static inline int pinconf_validate_map(struct pinctrl_map
const *map
, int i
)
49 static inline int pinconf_map_to_setting(struct pinctrl_map
const *map
,
50 struct pinctrl_setting
*setting
)
55 static inline void pinconf_free_setting(struct pinctrl_setting
const *setting
)
59 static inline int pinconf_apply_setting(struct pinctrl_setting
const *setting
)
64 static inline void pinconf_show_map(struct seq_file
*s
,
65 struct pinctrl_map
const *map
)
69 static inline void pinconf_show_setting(struct seq_file
*s
,
70 struct pinctrl_setting
const *setting
)
74 static inline void pinconf_init_device_debugfs(struct dentry
*devroot
,
75 struct pinctrl_dev
*pctldev
)
82 * The following functions are available if the driver uses the generic
86 #ifdef CONFIG_GENERIC_PINCONF
88 void pinconf_generic_dump_pin(struct pinctrl_dev
*pctldev
,
89 struct seq_file
*s
, unsigned pin
);
91 void pinconf_generic_dump_group(struct pinctrl_dev
*pctldev
,
92 struct seq_file
*s
, const char *gname
);
96 static inline void pinconf_generic_dump_pin(struct pinctrl_dev
*pctldev
,
103 static inline void pinconf_generic_dump_group(struct pinctrl_dev
*pctldev
,