diff options
| author | Sherman Yin <[email protected]> | 2013-08-27 11:32:12 -0700 |
|---|---|---|
| committer | Linus Walleij <[email protected]> | 2013-08-28 13:34:41 +0200 |
| commit | 03b054e9696c3cbd3d5905ec96da15acd0a2fe8d (patch) | |
| tree | 7123b780c194d350b3e5134c267e17262effb385 /include/linux/pinctrl | |
| parent | f5ba9c52bf1e236c4698c240955e5f119db62a28 (diff) | |
pinctrl: Pass all configs to driver on pin_config_set()
When setting pin configuration in the pinctrl framework, pin_config_set() or
pin_config_group_set() is called in a loop to set one configuration at a time
for the specified pin or group.
This patch 1) removes the loop and 2) changes the API to pass the whole pin
config array to the driver. It is now up to the driver to loop through the
configs. This allows the driver to potentially combine configs and reduce the
number of writes to pin config registers.
All c files changed have been build-tested to verify the change compiles and
that the corresponding .o is successfully generated.
Signed-off-by: Sherman Yin <[email protected]>
Reviewed-by: Christian Daudt <[email protected]>
Reviewed-by: Matt Porter <[email protected]>
Tested-by: Stephen Warren <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'include/linux/pinctrl')
| -rw-r--r-- | include/linux/pinctrl/pinconf.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/pinctrl/pinconf.h b/include/linux/pinctrl/pinconf.h index f6998692bdc9..09eb80f2574a 100644 --- a/include/linux/pinctrl/pinconf.h +++ b/include/linux/pinctrl/pinconf.h @@ -47,13 +47,15 @@ struct pinconf_ops { unsigned long *config); int (*pin_config_set) (struct pinctrl_dev *pctldev, unsigned pin, - unsigned long config); + unsigned long *configs, + unsigned num_configs); int (*pin_config_group_get) (struct pinctrl_dev *pctldev, unsigned selector, unsigned long *config); int (*pin_config_group_set) (struct pinctrl_dev *pctldev, unsigned selector, - unsigned long config); + unsigned long *configs, + unsigned num_configs); int (*pin_config_dbg_parse_modify) (struct pinctrl_dev *pctldev, const char *arg, unsigned long *config); |