diff options
author | Xin Xie <xxie@nvidia.com> | 2011-08-16 14:24:31 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-08-23 15:39:14 -0700 |
commit | a7524ab7bff09a8705c533ffef2fd29f5fd9ce28 (patch) | |
tree | e448dc707104779be1b9c7d898ae4ba3604a342a /drivers/regulator | |
parent | 292396ef92f02c0295a9bcd2987c8c943e7fcef3 (diff) |
regulator: max8952: force PWM mode
BUG 860982
Change-Id: I7ffaa6825ed873364143784d9939bea8224d8200
Reviewed-on: http://git-master/r/47385
Reviewed-by: Hyong Bin Kim <hyongbink@nvidia.com>
Tested-by: Hyong Bin Kim <hyongbink@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
Tested-by: Simon Je <sje@nvidia.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/max8952.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index bc0c8b8835c5..9ff509d01f55 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c @@ -211,6 +211,15 @@ static int max8952_set_voltage(struct regulator_dev *rdev, int min_uV, val); } +static int max8952_set_fpwm(struct regulator_dev *rdev, int en) +{ + struct max8952 *max8952 = rdev_get_drvdata(rdev); + const struct max8952_info *reg = &max8952_regulators[rdev_get_id(rdev)]; + + return max8952_set_bits(max8952, reg->reg_base, MAX8952_MASK_FPWM_EN, + en ? MAX8952_MASK_FPWM_EN : 0); +} + static int max8952_get_voltage(struct regulator_dev *rdev) { struct max8952 *max8952 = rdev_get_drvdata(rdev); @@ -256,6 +265,8 @@ static int __devinit max8952_probe(struct i2c_client *i2c, } i2c_set_clientdata(i2c, max8952); + /* force PWM mode */ + max8952_set_fpwm(rdev, 1); return 0; error: |