diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-03-01 20:48:32 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-03-02 10:18:24 -0500 |
commit | 46919ae63d4820e76724beb655274ce143f0da0b (patch) | |
tree | a16dfab490eb0d68db9d633f172bab98b1035485 /drivers/pinctrl/core.h | |
parent | d4e3198736d9d64e4ba4d2b46ab75cbcf5d0a4e0 (diff) |
pinctrl: introduce PINCTRL_STATE_DEFAULT, define hogs as that state
This provides a single centralized name for the default state.
Update PIN_MAP_* macros to use this state name, instead of requiring the
user to pass a state name in.
With this change, hog entries in the mapping table are defined as those
with state name PINCTRL_STATE_DEFAULT, i.e. all entries have the same
name. This interacts badly with the nested iteration over mapping table
entries in pinctrl_hog_maps() and pinctrl_hog_map() which would now
attempt to claim each hog mapping table entry multiple times. Replacing
the custom hog code with a simple pinctrl_get()/pinctrl_enable().
Update documentation and mapping tables to use this.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.h')
-rw-r--r-- | drivers/pinctrl/core.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index 8164e7b4182b..97f8124b4381 100644 --- a/drivers/pinctrl/core.h +++ b/drivers/pinctrl/core.h | |||
@@ -27,7 +27,7 @@ struct pinctrl_gpio_range; | |||
27 | * @owner: module providing the pin controller, used for refcounting | 27 | * @owner: module providing the pin controller, used for refcounting |
28 | * @driver_data: driver data for drivers registering to the pin controller | 28 | * @driver_data: driver data for drivers registering to the pin controller |
29 | * subsystem | 29 | * subsystem |
30 | * @pinctrl_hogs: list of pin control maps hogged by this device | 30 | * @p: result of pinctrl_get() for this device |
31 | * @device_root: debugfs root for this device | 31 | * @device_root: debugfs root for this device |
32 | */ | 32 | */ |
33 | struct pinctrl_dev { | 33 | struct pinctrl_dev { |
@@ -39,7 +39,7 @@ struct pinctrl_dev { | |||
39 | struct device *dev; | 39 | struct device *dev; |
40 | struct module *owner; | 40 | struct module *owner; |
41 | void *driver_data; | 41 | void *driver_data; |
42 | struct list_head pinctrl_hogs; | 42 | struct pinctrl *p; |
43 | #ifdef CONFIG_DEBUG_FS | 43 | #ifdef CONFIG_DEBUG_FS |
44 | struct dentry *device_root; | 44 | struct dentry *device_root; |
45 | #endif | 45 | #endif |