Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165374
b: refs/heads/master
c: 0198d11
h: refs/heads/master
v: v3
  • Loading branch information
Haojian Zhuang authored and Liam Girdwood committed Sep 22, 2009
1 parent a0f8570 commit d3f2279
Show file tree
Hide file tree
Showing 3 changed files with 36 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: 9c19bc0444490e76197f47316c649590dc6f10a4
refs/heads/master: 0198d1163b3e0313b3f073b62384abfab1a17cff
32 changes: 32 additions & 0 deletions trunk/drivers/regulator/da903x.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
#define DA9034_MDTV2 (0x33)
#define DA9034_MVRC (0x34)

/* DA9035 Registers. DA9034 Registers are comptabile to DA9035. */
#define DA9035_OVER3 (0x12)
#define DA9035_VCC2 (0x1f)
#define DA9035_3DTV1 (0x2c)
#define DA9035_3DTV2 (0x2d)
#define DA9035_3VRC (0x2e)
#define DA9035_AUTOSKIP (0x2f)

struct da903x_regulator_info {
struct regulator_desc desc;

Expand Down Expand Up @@ -388,6 +396,27 @@ static struct regulator_ops da9034_regulator_ldo12_ops = {
.enable_bit = (ebit), \
}

#define DA9035_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \
{ \
.desc = { \
.name = #_id, \
.ops = &da9034_regulator_dvc_ops, \
.type = REGULATOR_VOLTAGE, \
.id = DA9035_ID_##_id, \
.owner = THIS_MODULE, \
}, \
.min_uV = (min) * 1000, \
.max_uV = (max) * 1000, \
.step_uV = (step) * 1000, \
.vol_reg = DA9035_##vreg, \
.vol_shift = (0), \
.vol_nbits = (nbits), \
.update_reg = DA9035_##ureg, \
.update_bit = (ubit), \
.enable_reg = DA9035_##ereg, \
.enable_bit = (ebit), \
}

#define DA9034_LDO(_id, min, max, step, vreg, shift, nbits, ereg, ebit) \
DA903x_LDO(DA9034, _id, min, max, step, vreg, shift, nbits, ereg, ebit)

Expand Down Expand Up @@ -435,6 +464,9 @@ static struct da903x_regulator_info da903x_regulator_info[] = {
DA9034_LDO(14, 1800, 3300, 100, LDO1514, 0, 4, OVER3, 0),
DA9034_LDO(15, 1800, 3300, 100, LDO1514, 4, 4, OVER3, 1),
DA9034_LDO(5, 3100, 3100, 0, INVAL, 0, 0, OVER3, 7), /* fixed @3.1V */

/* DA9035 */
DA9035_DVC(BUCK3, 1800, 2200, 100, 3DTV1, 3, VCC2, 0, OVER3, 3),
};

static inline struct da903x_regulator_info *find_regulator_info(int id)
Expand Down
4 changes: 3 additions & 1 deletion trunk/include/linux/mfd/da903x.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __LINUX_PMIC_DA903X_H
#define __LINUX_PMIC_DA903X_H

/* Unified sub device IDs for DA9030/DA9034 */
/* Unified sub device IDs for DA9030/DA9034/DA9035 */
enum {
DA9030_ID_LED_1,
DA9030_ID_LED_2,
Expand Down Expand Up @@ -57,6 +57,8 @@ enum {
DA9034_ID_LDO13,
DA9034_ID_LDO14,
DA9034_ID_LDO15,

DA9035_ID_BUCK3,
};

/*
Expand Down

0 comments on commit d3f2279

Please sign in to comment.