Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292052
b: refs/heads/master
c: f30b071
h: refs/heads/master
v: v3
  • Loading branch information
Laxman Dewangan authored and Mark Brown committed Mar 11, 2012
1 parent d2c8d03 commit b13db7e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 844775ef987aaf09a1ddea668f9acd17f9548062
refs/heads/master: f30b0716feaedc0cf432ed8eca82c46104d64c0d
17 changes: 13 additions & 4 deletions trunk/drivers/regulator/tps65910-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
#define TPS65910_SUPPLY_STATE_ENABLED 0x1
#define EXT_SLEEP_CONTROL (TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 | \
TPS65910_SLEEP_CONTROL_EXT_INPUT_EN2 | \
TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3)
TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3 | \
TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP)

/* supported VIO voltages in milivolts */
static const u16 VIO_VSEL_table[] = {
Expand Down Expand Up @@ -922,6 +923,8 @@ static int tps65910_set_ext_sleep_config(struct tps65910_reg *pmic,
TPS65910_SLEEP_CONTROL_EXT_INPUT_EN2) != 0);
en_count += ((ext_sleep_config &
TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3) != 0);
en_count += ((ext_sleep_config &
TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP) != 0);
if (en_count > 1) {
dev_err(mfd->dev,
"External sleep control flag is not proper\n");
Expand Down Expand Up @@ -1018,12 +1021,18 @@ static int tps65910_set_ext_sleep_config(struct tps65910_reg *pmic,

ret = tps65910_clear_bits(mfd,
TPS65910_SLEEP_KEEP_LDO_ON + regoffs, bit_pos);
if (!ret)
ret = tps65910_set_bits(mfd,
TPS65910_SLEEP_SET_LDO_OFF + regoffs, bit_pos);
if (!ret) {
if (ext_sleep_config & TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP)
ret = tps65910_set_bits(mfd,
TPS65910_SLEEP_SET_LDO_OFF + regoffs, bit_pos);
else
ret = tps65910_clear_bits(mfd,
TPS65910_SLEEP_SET_LDO_OFF + regoffs, bit_pos);
}
if (ret < 0)
dev_err(mfd->dev,
"Error in configuring SLEEP register\n");

return ret;
}

Expand Down
5 changes: 2 additions & 3 deletions trunk/include/linux/mfd/tps65910.h
Original file line number Diff line number Diff line change
Expand Up @@ -768,12 +768,11 @@
/* Max number of TPS65910/11 regulators */
#define TPS65910_NUM_REGS 13

/* External sleep controls through EN1/EN2/EN3 inputs*/
/* External sleep controls through EN1/EN2/EN3/SLEEP inputs */
#define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 0x1
#define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN2 0x2
#define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3 0x4
/* TPS65911 names the EN3 signal as SLEEP */
#define TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP 0x4
#define TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP 0x8

/**
* struct tps65910_board
Expand Down

0 comments on commit b13db7e

Please sign in to comment.