* [PATCH 1/2] regulator: tps6507x: Convert to get_voltage_sel
@ 2012-04-20 10:33 Axel Lin
2012-04-20 10:36 ` [PATCH 2/2] regulator: max8952: " Axel Lin
2012-04-20 13:04 ` [PATCH 1/2] regulator: tps6507x: " Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2012-04-20 10:33 UTC (permalink / raw)
To: linux-kernel; +Cc: Anuj Aggarwal, Liam Girdwood, Mark Brown
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/tps6507x-regulator.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c
index 8e432004b..ef885ac 100644
--- a/drivers/regulator/tps6507x-regulator.c
+++ b/drivers/regulator/tps6507x-regulator.c
@@ -283,7 +283,7 @@ static int tps6507x_pmic_disable(struct regulator_dev *dev)
1 << shift);
}
-static int tps6507x_pmic_get_voltage(struct regulator_dev *dev)
+static int tps6507x_pmic_get_voltage_sel(struct regulator_dev *dev)
{
struct tps6507x_pmic *tps = rdev_get_drvdata(dev);
int data, rid = rdev_get_id(dev);
@@ -325,7 +325,7 @@ static int tps6507x_pmic_get_voltage(struct regulator_dev *dev)
return data;
data &= mask;
- return tps->info[rid]->table[data] * 1000;
+ return data;
}
static int tps6507x_pmic_set_voltage_sel(struct regulator_dev *dev,
@@ -395,7 +395,7 @@ static struct regulator_ops tps6507x_pmic_ops = {
.is_enabled = tps6507x_pmic_is_enabled,
.enable = tps6507x_pmic_enable,
.disable = tps6507x_pmic_disable,
- .get_voltage = tps6507x_pmic_get_voltage,
+ .get_voltage_sel = tps6507x_pmic_get_voltage_sel,
.set_voltage_sel = tps6507x_pmic_set_voltage_sel,
.list_voltage = tps6507x_pmic_list_voltage,
};
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] regulator: max8952: Convert to get_voltage_sel
2012-04-20 10:33 [PATCH 1/2] regulator: tps6507x: Convert to get_voltage_sel Axel Lin
@ 2012-04-20 10:36 ` Axel Lin
2012-04-20 13:06 ` Mark Brown
2012-04-20 13:04 ` [PATCH 1/2] regulator: tps6507x: " Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2012-04-20 10:36 UTC (permalink / raw)
To: linux-kernel; +Cc: Mark Brown, Kyungmin Park, Liam Girdwood
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/max8952.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c
index c0ab4dd..62ae140 100644
--- a/drivers/regulator/max8952.c
+++ b/drivers/regulator/max8952.c
@@ -69,11 +69,6 @@ static int max8952_write_reg(struct max8952_data *max8952,
return i2c_smbus_write_byte_data(max8952->client, reg, value);
}
-static int max8952_voltage(struct max8952_data *max8952, u8 mode)
-{
- return (max8952->pdata->dvs_mode[mode] * 10 + 770) * 1000;
-}
-
static int max8952_list_voltage(struct regulator_dev *rdev,
unsigned int selector)
{
@@ -82,7 +77,7 @@ static int max8952_list_voltage(struct regulator_dev *rdev,
if (rdev_get_id(rdev) != 0)
return -EINVAL;
- return max8952_voltage(max8952, selector);
+ return (max8952->pdata->dvs_mode[selector] * 10 + 770) * 1000;
}
static int max8952_is_enabled(struct regulator_dev *rdev)
@@ -117,7 +112,7 @@ static int max8952_disable(struct regulator_dev *rdev)
return 0;
}
-static int max8952_get_voltage(struct regulator_dev *rdev)
+static int max8952_get_voltage_sel(struct regulator_dev *rdev)
{
struct max8952_data *max8952 = rdev_get_drvdata(rdev);
u8 vid = 0;
@@ -127,7 +122,7 @@ static int max8952_get_voltage(struct regulator_dev *rdev)
if (max8952->vid1)
vid += 2;
- return max8952_voltage(max8952, vid);
+ return vid;
}
static int max8952_set_voltage_sel(struct regulator_dev *rdev,
@@ -154,7 +149,7 @@ static struct regulator_ops max8952_ops = {
.is_enabled = max8952_is_enabled,
.enable = max8952_enable,
.disable = max8952_disable,
- .get_voltage = max8952_get_voltage,
+ .get_voltage_sel = max8952_get_voltage_sel,
.set_voltage_sel = max8952_set_voltage_sel,
.set_suspend_disable = max8952_disable,
};
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] regulator: tps6507x: Convert to get_voltage_sel
2012-04-20 10:33 [PATCH 1/2] regulator: tps6507x: Convert to get_voltage_sel Axel Lin
2012-04-20 10:36 ` [PATCH 2/2] regulator: max8952: " Axel Lin
@ 2012-04-20 13:04 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-04-20 13:04 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Anuj Aggarwal, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 123 bytes --]
On Fri, Apr 20, 2012 at 06:33:52PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] regulator: max8952: Convert to get_voltage_sel
2012-04-20 10:36 ` [PATCH 2/2] regulator: max8952: " Axel Lin
@ 2012-04-20 13:06 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-04-20 13:06 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Kyungmin Park, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 123 bytes --]
On Fri, Apr 20, 2012 at 06:36:14PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-20 13:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-20 10:33 [PATCH 1/2] regulator: tps6507x: Convert to get_voltage_sel Axel Lin
2012-04-20 10:36 ` [PATCH 2/2] regulator: max8952: " Axel Lin
2012-04-20 13:06 ` Mark Brown
2012-04-20 13:04 ` [PATCH 1/2] regulator: tps6507x: " Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.