aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLaurent Meunier <laurent.meunier@st.com>2013-04-18 04:48:07 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-04-19 09:45:05 -0400
commitf07512e615dd8ebd0866efc38b39ccd41f1495d8 (patch)
tree3c50418dad838e31f5f870a6d4d57ab4d7f8f20b /include
parent06b62d82146fed98fcb846c4d93d85f1dea5d36a (diff)
pinctrl/pinconfig: add debug interface
This update adds a debugfs interface to modify a pin configuration for a given state in the pinctrl map. This allows to modify the configuration for a non-active state, typically sleep state. This configuration is not applied right away, but only when the state will be entered. This solution is mandated for us by HW validation: in order to test and verify several pin configurations during sleep without recompiling the software. Change log in this patch set; Take into account latest feedback from Stephen Warren: - stale comments update - improved code efficiency and readibility - limit size of global variable pinconf_dbg_conf - remove req_type as it can easily be added later when add/delete requests support is implemented Signed-off-by: Laurent Meunier <laurent.meunier@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pinctrl/pinconf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pinctrl/pinconf.h b/include/linux/pinctrl/pinconf.h
index e7a720104a47..1ad4f31ef6b8 100644
--- a/include/linux/pinctrl/pinconf.h
+++ b/include/linux/pinctrl/pinconf.h
@@ -14,6 +14,8 @@
14 14
15#ifdef CONFIG_PINCONF 15#ifdef CONFIG_PINCONF
16 16
17#include <linux/pinctrl/machine.h>
18
17struct pinctrl_dev; 19struct pinctrl_dev;
18struct seq_file; 20struct seq_file;
19 21
@@ -28,6 +30,7 @@ struct seq_file;
28 * @pin_config_set: configure an individual pin 30 * @pin_config_set: configure an individual pin
29 * @pin_config_group_get: get configurations for an entire pin group 31 * @pin_config_group_get: get configurations for an entire pin group
30 * @pin_config_group_set: configure all pins in a group 32 * @pin_config_group_set: configure all pins in a group
33 * @pin_config_group_dbg_set: optional debugfs to modify a pin configuration
31 * @pin_config_dbg_show: optional debugfs display hook that will provide 34 * @pin_config_dbg_show: optional debugfs display hook that will provide
32 * per-device info for a certain pin in debugfs 35 * per-device info for a certain pin in debugfs
33 * @pin_config_group_dbg_show: optional debugfs display hook that will provide 36 * @pin_config_group_dbg_show: optional debugfs display hook that will provide
@@ -51,6 +54,9 @@ struct pinconf_ops {
51 int (*pin_config_group_set) (struct pinctrl_dev *pctldev, 54 int (*pin_config_group_set) (struct pinctrl_dev *pctldev,
52 unsigned selector, 55 unsigned selector,
53 unsigned long config); 56 unsigned long config);
57 int (*pin_config_dbg_parse_modify) (struct pinctrl_dev *pctldev,
58 const char *arg,
59 unsigned long *config);
54 void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev, 60 void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev,
55 struct seq_file *s, 61 struct seq_file *s,
56 unsigned offset); 62 unsigned offset);