Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251936
b: refs/heads/master
c: db13c04
h: refs/heads/master
v: v3
  • Loading branch information
Haojian Zhuang authored and Samuel Ortiz committed May 26, 2011
1 parent 8c593b6 commit 35b27a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: 2402ca5e300db0d88fce9e0b3a5218863c71b694
refs/heads/master: db13c04002e0d896f89657f9b2837a8ecfbb19b6
11 changes: 8 additions & 3 deletions trunk/drivers/regulator/max8925-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#define SD1_DVM_SHIFT 5 /* SDCTL1 bit5 */
#define SD1_DVM_EN 6 /* SDV1 bit 6 */

/* bit definitions in SD & LDO control registers */
#define OUT_ENABLE 0x1f /* Power U/D sequence as I2C */
#define OUT_DISABLE 0x1e /* Power U/D sequence as I2C */

struct max8925_regulator_info {
struct regulator_desc desc;
struct regulator_dev *regulator;
Expand Down Expand Up @@ -93,16 +97,17 @@ static int max8925_enable(struct regulator_dev *rdev)
struct max8925_regulator_info *info = rdev_get_drvdata(rdev);

return max8925_set_bits(info->i2c, info->enable_reg,
1 << info->enable_bit,
1 << info->enable_bit);
OUT_ENABLE << info->enable_bit,
OUT_ENABLE << info->enable_bit);
}

static int max8925_disable(struct regulator_dev *rdev)
{
struct max8925_regulator_info *info = rdev_get_drvdata(rdev);

return max8925_set_bits(info->i2c, info->enable_reg,
1 << info->enable_bit, 0);
OUT_ENABLE << info->enable_bit,
OUT_DISABLE << info->enable_bit);
}

static int max8925_is_enabled(struct regulator_dev *rdev)
Expand Down

0 comments on commit 35b27a6

Please sign in to comment.