diff options
author | Julien Delacou <julien.delacou@stericsson.com> | 2012-12-10 08:47:33 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-01-11 15:48:05 -0500 |
commit | 840a47ba43a2aefbd9834924228549879ee3cb49 (patch) | |
tree | e507b5f5dc2b0c81fdbf16e99b5511d0197a9ac3 /drivers/pinctrl/core.h | |
parent | 89216494ae23dc0071a2b7f8d8264cee55cc211d (diff) |
pinctrl: add sleep mode management for hogs
This fix allows handling sleep mode for hogged
pins in pinctrl. It provides functions to set pins
to sleep/default configurations according to their
current state.
Signed-off-by: Julien Delacou <julien.delacou@stericsson.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.h')
-rw-r--r-- | drivers/pinctrl/core.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index 12f5694f3d5d..232a9f6db4aa 100644 --- a/drivers/pinctrl/core.h +++ b/drivers/pinctrl/core.h | |||
@@ -30,6 +30,8 @@ struct pinctrl_gpio_range; | |||
30 | * @driver_data: driver data for drivers registering to the pin controller | 30 | * @driver_data: driver data for drivers registering to the pin controller |
31 | * subsystem | 31 | * subsystem |
32 | * @p: result of pinctrl_get() for this device | 32 | * @p: result of pinctrl_get() for this device |
33 | * @hog_default: default state for pins hogged by this device | ||
34 | * @hog_sleep: sleep state for pins hogged by this device | ||
33 | * @device_root: debugfs root for this device | 35 | * @device_root: debugfs root for this device |
34 | */ | 36 | */ |
35 | struct pinctrl_dev { | 37 | struct pinctrl_dev { |
@@ -41,6 +43,8 @@ struct pinctrl_dev { | |||
41 | struct module *owner; | 43 | struct module *owner; |
42 | void *driver_data; | 44 | void *driver_data; |
43 | struct pinctrl *p; | 45 | struct pinctrl *p; |
46 | struct pinctrl_state *hog_default; | ||
47 | struct pinctrl_state *hog_sleep; | ||
44 | #ifdef CONFIG_DEBUG_FS | 48 | #ifdef CONFIG_DEBUG_FS |
45 | struct dentry *device_root; | 49 | struct dentry *device_root; |
46 | #endif | 50 | #endif |
@@ -164,5 +168,8 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, | |||
164 | bool dup, bool locked); | 168 | bool dup, bool locked); |
165 | void pinctrl_unregister_map(struct pinctrl_map const *map); | 169 | void pinctrl_unregister_map(struct pinctrl_map const *map); |
166 | 170 | ||
171 | extern int pinctrl_force_sleep(struct pinctrl_dev *pctldev); | ||
172 | extern int pinctrl_force_default(struct pinctrl_dev *pctldev); | ||
173 | |||
167 | extern struct mutex pinctrl_mutex; | 174 | extern struct mutex pinctrl_mutex; |
168 | extern struct list_head pinctrldev_list; | 175 | extern struct list_head pinctrldev_list; |