Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336338
b: refs/heads/master
c: d9b24e3
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Guenter Roeck committed Dec 5, 2012
1 parent 597ca42 commit a27872a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 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: 72cbdddcc158fa52056619b81624df0cd9125a26
refs/heads/master: d9b24e373d160ffd56633cc9a4b2e4013c2682d1
27 changes: 7 additions & 20 deletions trunk/drivers/hwmon/da9052-hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,17 @@ static inline int vbbat_reg_to_mV(int value)
return DIV_ROUND_CLOSEST(value * 2500, 512);
}

static int da9052_enable_vddout_channel(struct da9052 *da9052)
static inline int da9052_enable_vddout_channel(struct da9052 *da9052)
{
int ret;

ret = da9052_reg_read(da9052, DA9052_ADC_CONT_REG);
if (ret < 0)
return ret;

ret |= DA9052_ADCCONT_AUTOVDDEN;

return da9052_reg_write(da9052, DA9052_ADC_CONT_REG, ret);
return da9052_reg_update(da9052, DA9052_ADC_CONT_REG,
DA9052_ADCCONT_AUTOVDDEN,
DA9052_ADCCONT_AUTOVDDEN);
}

static int da9052_disable_vddout_channel(struct da9052 *da9052)
static inline int da9052_disable_vddout_channel(struct da9052 *da9052)
{
int ret;

ret = da9052_reg_read(da9052, DA9052_ADC_CONT_REG);
if (ret < 0)
return ret;

ret &= ~DA9052_ADCCONT_AUTOVDDEN;

return da9052_reg_write(da9052, DA9052_ADC_CONT_REG, ret);
return da9052_reg_update(da9052, DA9052_ADC_CONT_REG,
DA9052_ADCCONT_AUTOVDDEN, 0);
}

static ssize_t da9052_read_vddout(struct device *dev,
Expand Down

0 comments on commit a27872a

Please sign in to comment.