* [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS
@ 2010-12-01 20:37 Stephen Warren
2010-12-01 20:37 ` [PATCH 1/4] regulator: tps6586x: Add missing bit mask generation Stephen Warren
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Stephen Warren @ 2010-12-01 20:37 UTC (permalink / raw)
To: linux-kernel; +Cc: lrg, broonie, dahuang, olofj, Stephen Warren
Following are some patches for the tps6586x regulator driver that were
made in the ChromeOS repository.
A variety of people have built a kernel containing these patches, and
booted Tegra Seaboard with that kernel.
Danny Huang (4):
regulator: tps6586x: Add missing bit mask generation
regulator: tps6586x: Fix TPS6586X_DVM to store goreg/bit
regulator: tps6586x: Handle both enable reg/bits being the same
regulator: tps6586x: correct register table
drivers/regulator/tps6586x-regulator.c | 33 +++++++++++++++++++++----------
1 files changed, 22 insertions(+), 11 deletions(-)
--
nvpublic
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] regulator: tps6586x: Add missing bit mask generation
2010-12-01 20:37 [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Stephen Warren
@ 2010-12-01 20:37 ` Stephen Warren
2010-12-01 20:37 ` [PATCH 2/4] regulator: tps6586x: Fix TPS6586X_DVM to store goreg/bit Stephen Warren
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Stephen Warren @ 2010-12-01 20:37 UTC (permalink / raw)
To: linux-kernel; +Cc: lrg, broonie, dahuang, olofj, Stephen Warren
From: Danny Huang <dahuang@nvidia.com>
Change-Id: I76eaceb31b56264f6978af15db1e6fc7e2e01b5a
Signed-off-by: Danny Huang <dahuang@nvidia.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(Split into separate patches)
---
drivers/regulator/tps6586x-regulator.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 51237fb..0e59e81 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -298,14 +298,14 @@ static inline int tps6586x_regulator_preinit(struct device *parent,
if (ret)
return ret;
- if (!(val2 & ri->enable_bit[1]))
+ if (!(val2 & (1 << ri->enable_bit[1])))
return 0;
/*
* The regulator is on, but it's enabled with the bit we don't
* want to use, so we switch the enable bits
*/
- if (!(val1 & ri->enable_bit[0])) {
+ if (!(val1 & (1 << ri->enable_bit[0]))) {
ret = tps6586x_set_bits(parent, ri->enable_reg[0],
1 << ri->enable_bit[0]);
if (ret)
--
1.7.0.4
nvpublic
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] regulator: tps6586x: Fix TPS6586X_DVM to store goreg/bit
2010-12-01 20:37 [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Stephen Warren
2010-12-01 20:37 ` [PATCH 1/4] regulator: tps6586x: Add missing bit mask generation Stephen Warren
@ 2010-12-01 20:37 ` Stephen Warren
2010-12-01 20:37 ` [PATCH 3/4] regulator: tps6586x: Handle both enable reg/bits being the same Stephen Warren
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Stephen Warren @ 2010-12-01 20:37 UTC (permalink / raw)
To: linux-kernel; +Cc: lrg, broonie, dahuang, olofj, Stephen Warren
From: Danny Huang <dahuang@nvidia.com>
Change-Id: Idacf5e1e51dbbbcd5ea93f310a4e907977e7359e
Signed-off-by: Danny Huang <dahuang@nvidia.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(Split into separate patches)
(Minor formatting fixes)
---
drivers/regulator/tps6586x-regulator.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 0e59e81..effa677 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -231,8 +231,7 @@ static int tps6586x_dvm_voltages[] = {
};
#define TPS6586X_REGULATOR(_id, vdata, _ops, vreg, shift, nbits, \
- ereg0, ebit0, ereg1, ebit1, goreg, gobit) \
-{ \
+ ereg0, ebit0, ereg1, ebit1) \
.desc = { \
.name = "REG-" #_id, \
.ops = &tps6586x_regulator_##_ops, \
@@ -248,18 +247,26 @@ static int tps6586x_dvm_voltages[] = {
.enable_bit[0] = (ebit0), \
.enable_reg[1] = TPS6586X_SUPPLY##ereg1, \
.enable_bit[1] = (ebit1), \
- .voltages = tps6586x_##vdata##_voltages, \
-}
+ .voltages = tps6586x_##vdata##_voltages,
+
+#define TPS6586X_REGULATOR_DVM_GOREG(goreg, gobit) \
+ .go_reg = TPS6586X_##goreg, \
+ .go_bit = (gobit),
#define TPS6586X_LDO(_id, vdata, vreg, shift, nbits, \
ereg0, ebit0, ereg1, ebit1) \
+{ \
TPS6586X_REGULATOR(_id, vdata, ldo_ops, vreg, shift, nbits, \
- ereg0, ebit0, ereg1, ebit1, 0, 0)
+ ereg0, ebit0, ereg1, ebit1) \
+}
#define TPS6586X_DVM(_id, vdata, vreg, shift, nbits, \
ereg0, ebit0, ereg1, ebit1, goreg, gobit) \
+{ \
TPS6586X_REGULATOR(_id, vdata, dvm_ops, vreg, shift, nbits, \
- ereg0, ebit0, ereg1, ebit1, goreg, gobit)
+ ereg0, ebit0, ereg1, ebit1) \
+ TPS6586X_REGULATOR_DVM_GOREG(goreg, gobit) \
+}
static struct tps6586x_regulator tps6586x_regulator[] = {
TPS6586X_LDO(LDO_0, ldo, SUPPLYV1, 5, 3, ENC, 0, END, 0),
--
1.7.0.4
nvpublic
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] regulator: tps6586x: Handle both enable reg/bits being the same
2010-12-01 20:37 [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Stephen Warren
2010-12-01 20:37 ` [PATCH 1/4] regulator: tps6586x: Add missing bit mask generation Stephen Warren
2010-12-01 20:37 ` [PATCH 2/4] regulator: tps6586x: Fix TPS6586X_DVM to store goreg/bit Stephen Warren
@ 2010-12-01 20:37 ` Stephen Warren
2010-12-01 20:37 ` [PATCH 4/4] regulator: tps6586x: correct register table Stephen Warren
2010-12-02 9:40 ` [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Mark Brown
4 siblings, 0 replies; 7+ messages in thread
From: Stephen Warren @ 2010-12-01 20:37 UTC (permalink / raw)
To: linux-kernel; +Cc: lrg, broonie, dahuang, olofj, Stephen Warren
From: Danny Huang <dahuang@nvidia.com>
Change-Id: I40400bb65eab496bb1becd26b37a9653b99d4f41
Signed-off-by: Danny Huang <dahuang@nvidia.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
(Split into separate patches)
---
drivers/regulator/tps6586x-regulator.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index effa677..c668944 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -297,6 +297,10 @@ static inline int tps6586x_regulator_preinit(struct device *parent,
uint8_t val1, val2;
int ret;
+ if (ri->enable_reg[0] == ri->enable_reg[1] &&
+ ri->enable_bit[0] == ri->enable_bit[1])
+ return 0;
+
ret = tps6586x_read(parent, ri->enable_reg[0], &val1);
if (ret)
return ret;
--
1.7.0.4
nvpublic
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] regulator: tps6586x: correct register table
2010-12-01 20:37 [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Stephen Warren
` (2 preceding siblings ...)
2010-12-01 20:37 ` [PATCH 3/4] regulator: tps6586x: Handle both enable reg/bits being the same Stephen Warren
@ 2010-12-01 20:37 ` Stephen Warren
2010-12-02 9:40 ` [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Mark Brown
4 siblings, 0 replies; 7+ messages in thread
From: Stephen Warren @ 2010-12-01 20:37 UTC (permalink / raw)
To: linux-kernel; +Cc: lrg, broonie, dahuang, olofj, Stephen Warren
From: Danny Huang <dahuang@nvidia.com>
Correct the register table for SM2, LDO8, RTC
Change-Id: I45348cec5ffbb7da9bd7523764fb611b537236b8
Signed-off-by: Danny Huang <dahuang@nvidia.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
drivers/regulator/tps6586x-regulator.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index c668944..6d20b04 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -274,11 +274,11 @@ static struct tps6586x_regulator tps6586x_regulator[] = {
TPS6586X_LDO(LDO_5, ldo, SUPPLYV6, 0, 3, ENE, 6, ENE, 6),
TPS6586X_LDO(LDO_6, ldo, SUPPLYV3, 0, 3, ENC, 4, END, 4),
TPS6586X_LDO(LDO_7, ldo, SUPPLYV3, 3, 3, ENC, 5, END, 5),
- TPS6586X_LDO(LDO_8, ldo, SUPPLYV1, 5, 3, ENC, 6, END, 6),
+ TPS6586X_LDO(LDO_8, ldo, SUPPLYV2, 5, 3, ENC, 6, END, 6),
TPS6586X_LDO(LDO_9, ldo, SUPPLYV6, 3, 3, ENE, 7, ENE, 7),
- TPS6586X_LDO(LDO_RTC, ldo, SUPPLYV4, 3, 3, ENE, 7, ENE, 7),
+ TPS6586X_LDO(LDO_RTC, ldo, SUPPLYV4, 3, 3, V4, 7, V4, 7),
TPS6586X_LDO(LDO_1, dvm, SUPPLYV1, 0, 5, ENC, 1, END, 1),
- TPS6586X_LDO(SM_2, sm2, SUPPLYV2, 0, 5, ENC, 1, END, 1),
+ TPS6586X_LDO(SM_2, sm2, SUPPLYV2, 0, 5, ENC, 7, END, 7),
TPS6586X_DVM(LDO_2, dvm, LDO2BV1, 0, 5, ENA, 3, ENB, 3, VCC2, 6),
TPS6586X_DVM(LDO_4, ldo4, LDO4V1, 0, 5, ENC, 3, END, 3, VCC1, 6),
--
1.7.0.4
nvpublic
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS
2010-12-01 20:37 [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Stephen Warren
` (3 preceding siblings ...)
2010-12-01 20:37 ` [PATCH 4/4] regulator: tps6586x: correct register table Stephen Warren
@ 2010-12-02 9:40 ` Mark Brown
2010-12-02 11:28 ` Liam Girdwood
4 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2010-12-02 9:40 UTC (permalink / raw)
To: Stephen Warren; +Cc: linux-kernel, lrg, dahuang, olofj
On Wed, Dec 01, 2010 at 01:37:27PM -0700, Stephen Warren wrote:
> Following are some patches for the tps6586x regulator driver that were
> made in the ChromeOS repository.
>
> A variety of people have built a kernel containing these patches, and
> booted Tegra Seaboard with that kernel.
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In general please do try to provide a bit more detail in your changelogs
- things like missing shifts are fairly obvious but...
> regulator: tps6586x: Fix TPS6586X_DVM to store goreg/bit
> regulator: tps6586x: Handle both enable reg/bits being the same
...things like these aren't obvious.
Please also note that the kernel does not use Gerritt.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS
2010-12-02 9:40 ` [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Mark Brown
@ 2010-12-02 11:28 ` Liam Girdwood
0 siblings, 0 replies; 7+ messages in thread
From: Liam Girdwood @ 2010-12-02 11:28 UTC (permalink / raw)
To: Mark Brown; +Cc: Stephen Warren, linux-kernel, dahuang, olofj
On Thu, 2010-12-02 at 09:40 +0000, Mark Brown wrote:
> On Wed, Dec 01, 2010 at 01:37:27PM -0700, Stephen Warren wrote:
> > Following are some patches for the tps6586x regulator driver that were
> > made in the ChromeOS repository.
> >
> > A variety of people have built a kernel containing these patches, and
> > booted Tegra Seaboard with that kernel.
>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
All applied.
Thanks
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-12-02 11:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-01 20:37 [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Stephen Warren
2010-12-01 20:37 ` [PATCH 1/4] regulator: tps6586x: Add missing bit mask generation Stephen Warren
2010-12-01 20:37 ` [PATCH 2/4] regulator: tps6586x: Fix TPS6586X_DVM to store goreg/bit Stephen Warren
2010-12-01 20:37 ` [PATCH 3/4] regulator: tps6586x: Handle both enable reg/bits being the same Stephen Warren
2010-12-01 20:37 ` [PATCH 4/4] regulator: tps6586x: correct register table Stephen Warren
2010-12-02 9:40 ` [PATCH 0/4] Various tps6586x regulator fixes from ChromeOS Mark Brown
2010-12-02 11:28 ` Liam Girdwood
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.