Skip to contentSkip to conversation

pxa/hx4700: bq24022 regulator needs to be enabled

PATCH New Paul Parsons 4 participants 8 messages Apr 15, 2011 – Apr 20, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pxa/hx4700: bq24022 regulator needs to be enabled

Add REGULATOR_CHANGE_STATUS flag to hx4700 bq24022 regulator. Without this flag the bq24022 cannot be enabled and the battery will not charge.

---

arch/arm/mach-pxa/hx4700.c +1 -1
@@ -711,7 +711,7 @@ static struct regulator_consumer_supply 
 static struct regulator_init_data bq24022_init_data = {
 	.constraints = {
 		.max_uA         = 500000,
-		.valid_ops_mask = REGULATOR_CHANGE_CURRENT,
+		.valid_ops_mask = REGULATOR_CHANGE_CURRENT|REGULATOR_CHANGE_STATUS,
 	},
 	.num_consumer_supplies  = ARRAY_SIZE(bq24022_consumers),
 	.consumer_supplies      = bq24022_consumers,
#1 lore raw

PATCH 1/1 pxa/hx4700: bq24022 regulator needs to be enabled

Quoted 2 lines · Paul Parsons

Add REGULATOR_CHANGE_STATUS flag to hx4700 bq24022 regulator. Without this flag the bq24022 cannot be enabled and the battery will not charge.

Ah, so that's why my hx4700 doesn't charges under linux! I noticed that some time ago, but never found the time to investigate this. Thanks for finding this out. Will test.

BTW, this should probably go through Eric Miao's PXA tree, so adding him to CC list.

Quoted 19 lines

---

arch/arm/mach-pxa/hx4700.c +1 -1
@@ -711,7 +711,7 @@ static struct regulator_consumer_supply 
 static struct regulator_init_data bq24022_init_data = {
 	.constraints = {
 		.max_uA         = 500000,
-		.valid_ops_mask = REGULATOR_CHANGE_CURRENT,
+		.valid_ops_mask = REGULATOR_CHANGE_CURRENT|REGULATOR_CHANGE_STATUS,
 	},
 	.num_consumer_supplies  = ARRAY_SIZE(bq24022_consumers),
 	.consumer_supplies      = bq24022_consumers,

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 2 lines
Best regards,
Dmitry "MAD" Artamonow
Applied
#2 lore raw

PATCH 1/1 pxa/hx4700: bq24022 regulator needs to be enabled

Quoted 10 lines · Dmitry Artamonow
Quoted 2 lines · Paul Parsons

Add REGULATOR_CHANGE_STATUS flag to hx4700 bq24022 regulator. Without this flag the bq24022 cannot be enabled and the battery will not charge.

Ah, so that's why my hx4700 doesn't charges under linux! I noticed that some time ago, but never found the time to investigate this. Thanks for finding this out. Will test.

BTW, this should probably go through Eric Miao's PXA tree, so adding him to CC list.

Applied to 'fix'.

#3 lore raw

PATCH 1/1 pxa/hx4700: bq24022 regulator needs to be enabled

In reply to Dmitry Artamonow
Quoted 6 lines · Dmitry Artamonow
Quoted 2 lines · Paul Parsons

Add REGULATOR_CHANGE_STATUS flag to hx4700 bq24022 regulator. Without this flag the bq24022 cannot be enabled and the battery will not charge.

Ah, so that's why my hx4700 doesn't charges under linux! I noticed that some time ago, but never found the time to investigate this. Thanks for finding this out. Will test.

Yes, looks like it really works! After about an hour in linux-2.6.38 with this patch applied, battery charged from about a half-empty to almost full (I verified by rebooting into WinMobile). Good! And in dmesg there were also "enabling charger" messages every time I plugged charger cable into device.

So, get my

Signature · 2 lines
Best regards,
Dmitry "MAD" Artamonow
#4 lore raw

PATCH 1/1 pxa/hx4700: bq24022 regulator needs to be enabled

Quoted 8 lines · Dmitry Artamonow
Quoted 6 lines · Dmitry Artamonow
Quoted 2 lines · Paul Parsons

Add REGULATOR_CHANGE_STATUS flag to hx4700 bq24022 regulator. Without this flag the bq24022 cannot be enabled and the battery will not charge.

Ah, so that's why my hx4700 doesn't charges under linux! I noticed that some time ago, but never found the time to investigate this. Thanks for finding this out. Will test.

Quoted 8 lines

Yes, looks like it really works! After about an hour in linux-2.6.38 with this patch applied, battery charged from about a half-empty to almost full (I verified by rebooting into WinMobile). Good! And in dmesg there were also "enabling charger" messages every time I plugged charger cable into device.

So, get my

Thanks. Updated and pushed. Will send out git-pull soon.

Quoted 6 lines

--
Best regards,
Dmitry "MAD" Artamonow

#5 lore raw

PATCH 1/1 pxa/hx4700: bq24022 regulator needs to be enabled

Am Dienstag, den 19.04.2011, 21:03 +0800 schrieb Eric Miao:

Quoted 9 lines · Dmitry Artamonow
Quoted 8 lines · Dmitry Artamonow
Quoted 6 lines · Paul Parsons
Quoted 2 lines

Add REGULATOR_CHANGE_STATUS flag to hx4700 bq24022 regulator. Without this flag the bq24022 cannot be enabled and the battery will not charge.

Ah, so that's why my hx4700 doesn't charges under linux! I noticed that some time ago, but never found the time to investigate this. Thanks for finding this out. Will test.

Quoted 5 lines
Quoted 5 lines

Yes, looks like it really works! After about an hour in linux-2.6.38 with this patch applied, battery charged from about a half-empty to almost full (I verified by rebooting into WinMobile). Good! And in dmesg there were also "enabling charger" messages every time I plugged charger cable into device.

Dito. Thank you, Paul!

Quoted 4 lines

So, get my

Quoted 1 line

Thanks. Updated and pushed. Will send out git-pull soon.

Eric, if it's not too late, could you also apply the same fix for magician?

cheers
Philipp

#6 lore raw

PATCH 1/1 pxa/magician: bq24022 regulator needs to be enabled

In reply to Eric Miao

Add REGULATOR_CHANGE_STATUS flag to magician bq24022 regulator to enable charging.

---
 arch/arm/mach-pxa/magician.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-pxa/magician.c +1 -1
index a72993d..9984ef7 100644
@@ -599,7 +599,7 @@ static struct regulator_consumer_supply bq24022_consumers[] = {
 static struct regulator_init_data bq24022_init_data = {
 	.constraints = {
 		.max_uA         = 500000,
-		.valid_ops_mask = REGULATOR_CHANGE_CURRENT,
+		.valid_ops_mask = REGULATOR_CHANGE_CURRENT | REGULATOR_CHANGE_STATUS,
 	},
 	.num_consumer_supplies  = ARRAY_SIZE(bq24022_consumers),
 	.consumer_supplies      = bq24022_consumers,
Signature · 1 line
1.7.4.4
Applied
#7 lore raw

PATCH 1/1 pxa/magician: bq24022 regulator needs to be enabled

Quoted 3 lines · Philipp Zabel

Add REGULATOR_CHANGE_STATUS flag to magician bq24022 regulator to enable charging.

Applied to 'fix'. Thanks.

Quoted 22 lines

---
?arch/arm/mach-pxa/magician.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)

arch/arm/mach-pxa/magician.c +1 -2
index a72993d..9984ef7 100644
@@ -599,7 +599,7 @@ static struct regulator_consumer_supply bq24022_consumers[] = {
 ?static struct regulator_init_data bq24022_init_data = {
 ? ? ? ?.constraints = {
 ? ? ? ? ? ? ? ?.max_uA ? ? ? ? = 500000,
- ? ? ? ? ? ? ? .valid_ops_mask = REGULATOR_CHANGE_CURRENT,
+ ? ? ? ? ? ? ? .valid_ops_mask = REGULATOR_CHANGE_CURRENT | REGULATOR_CHANGE_STATUS,
 ? ? ? ?},
 ? ? ? ?.num_consumer_supplies ?= ARRAY_SIZE(bq24022_consumers),
 ? ? ? ?.consumer_supplies ? ? ?= bq24022_consumers,
--

1.7.4.4