mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
06b62d8214
commit
f07512e615
2 changed files with 238 additions and 0 deletions
|
@ -14,6 +14,8 @@
|
|||
|
||||
#ifdef CONFIG_PINCONF
|
||||
|
||||
#include <linux/pinctrl/machine.h>
|
||||
|
||||
struct pinctrl_dev;
|
||||
struct seq_file;
|
||||
|
||||
|
@ -28,6 +30,7 @@ struct seq_file;
|
|||
* @pin_config_set: configure an individual pin
|
||||
* @pin_config_group_get: get configurations for an entire pin group
|
||||
* @pin_config_group_set: configure all pins in a group
|
||||
* @pin_config_group_dbg_set: optional debugfs to modify a pin configuration
|
||||
* @pin_config_dbg_show: optional debugfs display hook that will provide
|
||||
* per-device info for a certain pin in debugfs
|
||||
* @pin_config_group_dbg_show: optional debugfs display hook that will provide
|
||||
|
@ -51,6 +54,9 @@ struct pinconf_ops {
|
|||
int (*pin_config_group_set) (struct pinctrl_dev *pctldev,
|
||||
unsigned selector,
|
||||
unsigned long config);
|
||||
int (*pin_config_dbg_parse_modify) (struct pinctrl_dev *pctldev,
|
||||
const char *arg,
|
||||
unsigned long *config);
|
||||
void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev,
|
||||
struct seq_file *s,
|
||||
unsigned offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue