Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252176
b: refs/heads/master
c: 7955705
h: refs/heads/master
v: v3
  • Loading branch information
Jorge Eduardo Candelaria authored and Liam Girdwood committed May 27, 2011
1 parent d4f0973 commit eb4e926
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 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: 3c24019ddeab71ddf125ad2ad13a38041655c1fd
refs/heads/master: 795570561cc9c8dc7f7582ed6c4d07121b1c4831
4 changes: 3 additions & 1 deletion trunk/drivers/mfd/tps65910.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
i2c_set_clientdata(i2c, tps65910);
tps65910->dev = &i2c->dev;
tps65910->i2c_client = i2c;
tps65910->id = id->driver_data;
tps65910->read = tps65910_i2c_read;
tps65910->write = tps65910_i2c_write;
mutex_init(&tps65910->io_mutex);
Expand Down Expand Up @@ -192,7 +193,8 @@ static int tps65910_i2c_remove(struct i2c_client *i2c)
}

static const struct i2c_device_id tps65910_i2c_id[] = {
{ "tps65910", 0 },
{ "tps65910", TPS65910 },
{ "tps65911", TPS65911 },
{ }
};
MODULE_DEVICE_TABLE(i2c, tps65910_i2c_id);
Expand Down
46 changes: 46 additions & 0 deletions trunk/include/linux/mfd/tps65910.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
#ifndef __LINUX_MFD_TPS65910_H
#define __LINUX_MFD_TPS65910_H

/* TPS chip id list */
#define TPS65910 0
#define TPS65911 1

/* TPS regulator type list */
#define REGULATOR_LDO 0
#define REGULATOR_DCDC 1

/*
* List of registers for component TPS65910
*
Expand Down Expand Up @@ -96,6 +104,21 @@
#define TPS65910_JTAGVERNUM 0x80
#define TPS65910_MAX_REGISTER 0x80

/*
* List of registers specific to TPS65911
*/
#define TPS65911_VDDCTRL 0x27
#define TPS65911_VDDCTRL_OP 0x28
#define TPS65911_VDDCTRL_SR 0x29
#define TPS65911_LDO1 0x30
#define TPS65911_LDO2 0x31
#define TPS65911_LDO5 0x32
#define TPS65911_LDO8 0x33
#define TPS65911_LDO7 0x34
#define TPS65911_LDO6 0x35
#define TPS65911_LDO4 0x36
#define TPS65911_LDO3 0x37

/*
* List of register bitfields for component TPS65910
*
Expand Down Expand Up @@ -702,6 +725,23 @@
#define JTAGVERNUM_VERNUM_SHIFT 0


/* Register VDDCTRL (0x27) bit definitions */
#define VDDCTRL_ST_MASK 0x03
#define VDDCTRL_ST_SHIFT 0


/*Register VDDCTRL_OP (0x28) bit definitios */
#define VDDCTRL_OP_CMD_MASK 0x80
#define VDDCTRL_OP_CMD_SHIFT 7
#define VDDCTRL_OP_SEL_MASK 0x7F
#define VDDCTRL_OP_SEL_SHIFT 0


/*Register VDDCTRL_SR (0x29) bit definitions */
#define VDDCTRL_SR_SEL_MASK 0x7F
#define VDDCTRL_SR_SEL_SHIFT 0


/* IRQ Definitions */
#define TPS65910_IRQ_VBAT_VMBDCH 0
#define TPS65910_IRQ_VBAT_VMHI 1
Expand Down Expand Up @@ -742,6 +782,7 @@ struct tps65910 {
struct device *dev;
struct i2c_client *i2c_client;
struct mutex io_mutex;
unsigned int id;
int (*read)(struct tps65910 *tps65910, u8 reg, int size, void *dest);
int (*write)(struct tps65910 *tps65910, u8 reg, int size, void *src);

Expand Down Expand Up @@ -771,4 +812,9 @@ void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base);
int tps65910_irq_init(struct tps65910 *tps65910, int irq,
struct tps65910_platform_data *pdata);

static inline int tps65910_chip_id(struct tps65910 *tps65910)
{
return tps65910->id;
}

#endif /* __LINUX_MFD_TPS65910_H */

0 comments on commit eb4e926

Please sign in to comment.