summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/core.h
diff options
context:
space:
mode:
authorJulien Delacou <julien.delacou@stericsson.com>2012-12-10 14:47:33 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-01-11 21:48:05 +0100
commit840a47ba43a2aefbd9834924228549879ee3cb49 (patch)
treee507b5f5dc2b0c81fdbf16e99b5511d0197a9ac3 /drivers/pinctrl/core.h
parent89216494ae23dc0071a2b7f8d8264cee55cc211d (diff)
downloadop-kernel-dev-840a47ba43a2aefbd9834924228549879ee3cb49.zip
op-kernel-dev-840a47ba43a2aefbd9834924228549879ee3cb49.tar.gz
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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
index 12f5694..232a9f6 100644
--- a/drivers/pinctrl/core.h
+++ b/drivers/pinctrl/core.h
@@ -30,6 +30,8 @@ struct pinctrl_gpio_range;
* @driver_data: driver data for drivers registering to the pin controller
* subsystem
* @p: result of pinctrl_get() for this device
+ * @hog_default: default state for pins hogged by this device
+ * @hog_sleep: sleep state for pins hogged by this device
* @device_root: debugfs root for this device
*/
struct pinctrl_dev {
@@ -41,6 +43,8 @@ struct pinctrl_dev {
struct module *owner;
void *driver_data;
struct pinctrl *p;
+ struct pinctrl_state *hog_default;
+ struct pinctrl_state *hog_sleep;
#ifdef CONFIG_DEBUG_FS
struct dentry *device_root;
#endif
@@ -164,5 +168,8 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
bool dup, bool locked);
void pinctrl_unregister_map(struct pinctrl_map const *map);
+extern int pinctrl_force_sleep(struct pinctrl_dev *pctldev);
+extern int pinctrl_force_default(struct pinctrl_dev *pctldev);
+
extern struct mutex pinctrl_mutex;
extern struct list_head pinctrldev_list;
OpenPOWER on IntegriCloud