diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-02-01 01:39:04 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-02-06 01:08:29 -0500 |
commit | 9467d298e92455e6fd411d7ef1f367ced940587c (patch) | |
tree | b739a190c7aba72531e9592cbc9937b1a159db6c /include/linux/mfd/tps65910.h | |
parent | b43ab901d671e3e3cad425ea5e9a3c74e266dcdd (diff) |
gpio: tps65910: Add sleep control support
The device tps65910/tps65911 supports the sleep
functionality in some of gpios. If gpio is configured
in output mode and sleep is enabled then during device
sleep state, the output of gpio becomes LOW regardless
of non-sleep output value.
Such gpio can be used to control regulator switch such
that output of regulator is off in device sleep state.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/mfd/tps65910.h')
-rw-r--r-- | include/linux/mfd/tps65910.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index d0cb12eba402..9071902bd222 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h | |||
@@ -657,6 +657,8 @@ | |||
657 | 657 | ||
658 | 658 | ||
659 | /*Register GPIO (0x80) register.RegisterDescription */ | 659 | /*Register GPIO (0x80) register.RegisterDescription */ |
660 | #define GPIO_SLEEP_MASK 0x80 | ||
661 | #define GPIO_SLEEP_SHIFT 7 | ||
660 | #define GPIO_DEB_MASK 0x10 | 662 | #define GPIO_DEB_MASK 0x10 |
661 | #define GPIO_DEB_SHIFT 4 | 663 | #define GPIO_DEB_SHIFT 4 |
662 | #define GPIO_PUEN_MASK 0x08 | 664 | #define GPIO_PUEN_MASK 0x08 |
@@ -740,6 +742,11 @@ | |||
740 | #define TPS65910_GPIO_STS BIT(1) | 742 | #define TPS65910_GPIO_STS BIT(1) |
741 | #define TPS65910_GPIO_SET BIT(0) | 743 | #define TPS65910_GPIO_SET BIT(0) |
742 | 744 | ||
745 | /* Max number of TPS65910/11 GPIOs */ | ||
746 | #define TPS65910_NUM_GPIO 6 | ||
747 | #define TPS65911_NUM_GPIO 9 | ||
748 | #define TPS6591X_MAX_NUM_GPIO 9 | ||
749 | |||
743 | /* Regulator Index Definitions */ | 750 | /* Regulator Index Definitions */ |
744 | #define TPS65910_REG_VRTC 0 | 751 | #define TPS65910_REG_VRTC 0 |
745 | #define TPS65910_REG_VIO 1 | 752 | #define TPS65910_REG_VIO 1 |
@@ -779,6 +786,7 @@ struct tps65910_board { | |||
779 | int irq_base; | 786 | int irq_base; |
780 | int vmbch_threshold; | 787 | int vmbch_threshold; |
781 | int vmbch2_threshold; | 788 | int vmbch2_threshold; |
789 | bool en_gpio_sleep[TPS6591X_MAX_NUM_GPIO]; | ||
782 | struct regulator_init_data *tps65910_pmic_init_data[TPS65910_NUM_REGS]; | 790 | struct regulator_init_data *tps65910_pmic_init_data[TPS65910_NUM_REGS]; |
783 | }; | 791 | }; |
784 | 792 | ||