Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176048
b: refs/heads/master
c: b45440c
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Samuel Ortiz committed Dec 13, 2009
1 parent 2516269 commit 909b639
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 848369926693778cd0f31bfca7fb951164715b4f
refs/heads/master: b45440c33a0bdd824b98e4a4c56767c50d3275eb
28 changes: 28 additions & 0 deletions trunk/drivers/mfd/tps65010.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,34 @@ int tps65010_config_vregs1(unsigned value)
}
EXPORT_SYMBOL(tps65010_config_vregs1);

int tps65010_config_vdcdc2(unsigned value)
{
struct i2c_client *c;
int status;

if (!the_tps)
return -ENODEV;

c = the_tps->client;
mutex_lock(&the_tps->lock);

pr_debug("%s: vdcdc2 0x%02x\n", DRIVER_NAME,
i2c_smbus_read_byte_data(c, TPS_VDCDC2));

status = i2c_smbus_write_byte_data(c, TPS_VDCDC2, value);

if (status != 0)
printk(KERN_ERR "%s: Failed to write vdcdc2 register\n",
DRIVER_NAME);
else
pr_debug("%s: vregs1 0x%02x\n", DRIVER_NAME,
i2c_smbus_read_byte_data(c, TPS_VDCDC2));

mutex_unlock(&the_tps->lock);
return status;
}
EXPORT_SYMBOL(tps65010_config_vdcdc2);

/*-------------------------------------------------------------------------*/
/* tps65013_set_low_pwr parameter:
* mode: ON or OFF
Expand Down
19 changes: 19 additions & 0 deletions trunk/include/linux/i2c/tps65010.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@
#define TPS_VDCDC1 0x0c
# define TPS_ENABLE_LP (1 << 3)
#define TPS_VDCDC2 0x0d
# define TPS_LP_COREOFF (1 << 7)
# define TPS_VCORE_1_8V (7<<4)
# define TPS_VCORE_1_5V (6 << 4)
# define TPS_VCORE_1_4V (5 << 4)
# define TPS_VCORE_1_3V (4 << 4)
# define TPS_VCORE_1_2V (3 << 4)
# define TPS_VCORE_1_1V (2 << 4)
# define TPS_VCORE_1_0V (1 << 4)
# define TPS_VCORE_0_85V (0 << 4)
# define TPS_VCORE_LP_1_2V (3 << 2)
# define TPS_VCORE_LP_1_1V (2 << 2)
# define TPS_VCORE_LP_1_0V (1 << 2)
# define TPS_VCORE_LP_0_85V (0 << 2)
# define TPS_VIB (1 << 1)
# define TPS_VCORE_DISCH (1 << 0)
#define TPS_VREGS1 0x0e
# define TPS_LDO2_ENABLE (1 << 7)
# define TPS_LDO2_OFF (1 << 6)
Expand Down Expand Up @@ -152,6 +167,10 @@ extern int tps65010_config_vregs1(unsigned value);
*/
extern int tps65013_set_low_pwr(unsigned mode);

/* tps65010_set_vdcdc2
* value to be written to VDCDC2
*/
extern int tps65010_config_vdcdc2(unsigned value);

struct i2c_client;

Expand Down

0 comments on commit 909b639

Please sign in to comment.