Skip to contentSkip to conversation

battery-2.6.git

GIT PULL Anton Vorontsov 5 participants 8 messages Oct 26, 2010 – Oct 28, 2010

lore
Share & tools
lore
#0 lore raw

Hello Linus,

Please pull battery-2.6.git tree to receive changes prepared for 2.6.37.

There are three new drivers, various small cleanups and bug fixes.

You may notice the arch/arm/ change for Nokia N900 board, though it has an appropriate ack from the OMAP maintainer to go through the battery tree.

Thanks!

The following changes since commit 763008c4357b73c8d18396dfd8d79dc58fa3f99d:
Linus Torvalds (1):
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

are available in the git repository at:

git://git.infradead.org/battery-2.6.git master

Axel Lin (5):
pcf50633-charger: Add missing sysfs_remove_group()
ds2760_battery: Add missing kfree(di) in ds2760_battery_remove()
jz4740-battery: Add missing kfree(jz_battery) in jz_battery_remove()
wm831x_power: Add missing kfree(wm831x_power) in wm831x_power_remove()
bq27x00_battery: Add missing kfree(di->bus) in bq27x00_battery_remove()

Grazvydas Ignotas (1):
power_supply: Add driver for TWL4030/TPS65950 BCI charger

Heikki Krogerus (4):
power_supply: Add isp1704 charger detection driver
omap: rx51: Add support for USB chargers
power_supply: Add types for USB chargers
power_supply: Introduce maximum current property

Ian Lartey (1):
wm831x_power: Remove duplicate chg mask

Martin Schwidefsky (1):

      ds2760_battery: Fix W1 and W1_SLAVE_DS2760 dependency

Rhyland Klein (2):
power_supply: Add driver for TI BQ20Z75 gas gauge IC
bq20z75: Add support for more power supply properties

Richard A. Smith (1):
olpc_battery: Fix endian neutral breakage for s16 values

Ryan Mallon (1):
ds2782_battery: Fix units

matt mooney (1):
power_supply: Makefile cleanup

 arch/arm/mach-omap2/board-rx51-peripherals.c |    5 +
 drivers/power/Kconfig                        |   23 +-
 drivers/power/Makefile                       |   19 +-
 drivers/power/bq20z75.c                      |  493 ++++++++++++++++++++++
 drivers/power/bq27x00_battery.c              |    1 +
 drivers/power/ds2760_battery.c               |    1 +
 drivers/power/ds2782_battery.c               |   12 +-
 drivers/power/isp1704_charger.c              |  369 +++++++++++++++++
 drivers/power/jz4740-battery.c               |    1 +
 drivers/power/olpc_battery.c                 |    8 +-
 drivers/power/pcf50633-charger.c             |    1 +
 drivers/power/power_supply_sysfs.c           |    4 +-
 drivers/power/twl4030_charger.c              |  565 ++++++++++++++++++++++++++
 drivers/power/wm831x_power.c                 |    2 +-
 include/linux/power_supply.h                 |    6 +-
 15 files changed, 1483 insertions(+), 27 deletions(-)
 create mode 100644 drivers/power/bq20z75.c
 create mode 100644 drivers/power/isp1704_charger.c
 create mode 100644 drivers/power/twl4030_charger.c
#1 lore raw

-tip: origin tree build failure (battery-2.6.git related)

Hi,

Quoted 10 lines · Anton Vorontsov

Hello Linus,

Please pull battery-2.6.git tree to receive changes prepared for 2.6.37.

There are three new drivers, various small cleanups and bug fixes. [...]

Grazvydas Ignotas (1):
power_supply: Add driver for TWL4030/TPS65950 BCI charger

Today's -tip fails to build due to upstream commit 2e727f1 ("power_supply: Add driver for TWL4030/TPS65950 BCI charger"), on every x86 build that has this driver enabled (for example allyesconfig or allmodconfig):

drivers/power/twl4030_charger.c: In function ‘twl4030_clear_set_boot_bci’:
drivers/power/twl4030_charger.c:105: error: ‘TWL4030_PM_MASTER_BOOT_BCI’ undeclared (first use in this function) drivers/power/twl4030_charger.c:105: error: (Each undeclared identifier is reported only once drivers/power/twl4030_charger.c:105: error: for each function it appears in.) drivers/power/twl4030_charger.c: In function ‘twl4030_bci_have_vbus’:
drivers/power/twl4030_charger.c:137: error: ‘TWL4030_PM_MASTER_STS_HW_CONDITIONS’ undeclared (first use in this function)

The new driver does not build at its own commit point either, as the missing symbol definition is simply not there. It appears that commit 2e727f1 could not have been build-tested by anyone before it got upstream (let alone boot and functionality tested). As a temporary workaround i'm disabling it in -tip.

Thanks,

Ingo

#2 lore raw

Re: -tip: origin tree build failure (battery-2.6.git related)

Quoted 27 lines · On Thu, 28 Oct 2010 08:54:57 +0200 Ingo Molnar <[email protected]> wrote:

Hi,

Quoted 10 lines · Anton Vorontsov

Hello Linus,

Please pull battery-2.6.git tree to receive changes prepared for 2.6.37.

There are three new drivers, various small cleanups and bug fixes. [...]

Grazvydas Ignotas (1):
power_supply: Add driver for TWL4030/TPS65950 BCI charger

Today's -tip fails to build due to upstream commit 2e727f1 ("power_supply: Add driver for TWL4030/TPS65950 BCI charger"), on every x86 build that has this driver enabled (for example allyesconfig or allmodconfig):

drivers/power/twl4030_charger.c: In function ___twl4030_clear_set_boot_bci___:
drivers/power/twl4030_charger.c:105: error: ___TWL4030_PM_MASTER_BOOT_BCI___ undeclared (first use in this function) drivers/power/twl4030_charger.c:105: error: (Each undeclared identifier is reported only once drivers/power/twl4030_charger.c:105: error: for each function it appears in.) drivers/power/twl4030_charger.c: In function ___twl4030_bci_have_vbus___:
drivers/power/twl4030_charger.c:137: error: ___TWL4030_PM_MASTER_STS_HW_CONDITIONS___ undeclared (first use in this function)

Quoted 5 lines

The new driver does not build at its own commit point either, as the missing symbol definition is simply not there. It appears that commit 2e727f1 could not have been build-tested by anyone before it got upstream (let alone boot and functionality tested). As a temporary workaround i'm disabling it in -tip.

Those definitions get added by the MFD tree and used by the battery tree. Things arrived in the wrong order (and, yes, didn't get tested).

The fix is for Samuel to get a wiggle on with his merge? The -rc1 window is about to slam shut on his fingers anyway.

#3 lore raw

[GIT PULL] battery-2.6.git (a last minute fix)

On Thu, Oct 28, 2010 at 12:07:10AM -0700, Andrew Morton wrote:
[...]

Quoted 8 lines
Quoted 5 lines

The new driver does not build at its own commit point either, as the missing symbol definition is simply not there. It appears that commit 2e727f1 could not have been build-tested by anyone before it got upstream (let alone boot and functionality tested). As a temporary workaround i'm disabling it in -tip.

Those definitions get added by the MFD tree and used by the battery tree. Things arrived in the wrong order (and, yes, didn't get tested).

My bad. :-/

Quoted 2 lines

The fix is for Samuel to get a wiggle on with his merge? The -rc1 window is about to slam shut on his fingers anyway.

I guess the best thing for now would be to be safe and to disable the new driver via 'depends on BROKEN', so it won't scare testers away from -rc1.

Linus,

Please pull battery-2.6.git tree again, this is to disable the non-buildable (as it appears w/o MFD tree) driver.

The following changes since commit 81280572ca6f54009edfa4deee563e8678784218:
Linus Torvalds (1):
Merge branch 'upstream-merge' of git://git.kernel.org/.../tytso/ext4

are available in the git repository at:

git://git.infradead.org/battery-2.6.git master

Anton Vorontsov (1):
power_supply: Mark twl4030_charger as broken

 drivers/power/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

commit 23886839a752401aba66517bff8a8b91549279ce

Author: Anton Vorontsov <[email protected]>
Date:   Thu Oct 28 12:44:16 2010 +0400

power_supply: Mark twl4030_charger as broken

The driver is not buildable without MFD changes. For now, let's disable the driver as it breaks build for major platforms (i.e. x86).

CC [M] drivers/power/twl4030_charger.o
drivers/power/twl4030_charger.c: In function 'twl4030_clear_set_boot_bci':
drivers/power/twl4030_charger.c:105: error: 'TWL4030_PM_MASTER_BOOT_BCI' undeclared (first use in this function) drivers/power/twl4030_charger.c:105: error: (Each undeclared identifier is reported only once drivers/power/twl4030_charger.c:105: error: for each function it appears in.) drivers/power/twl4030_charger.c: In function 'twl4030_bci_have_vbus':
drivers/power/twl4030_charger.c:137: error: 'TWL4030_PM_MASTER_STS_HW_CONDITIONS' undeclared (first use in this function) drivers/power/twl4030_charger.c: In function 'twl4030_bci_probe':
drivers/power/twl4030_charger.c:477: warning: overflow in implicit constant conversion drivers/power/twl4030_charger.c:485: warning: overflow in implicit constant conversion
make[2]: *** [drivers/power/twl4030_charger.o] Error 1

We can re-enable it if MFD tree will finally merge into 2.6.37.

drivers/power/Kconfig +1 -0
index 60d83d9..ec44477 100644
@@ -182,6 +182,7 @@ config CHARGER_ISP1704
 config CHARGER_TWL4030
 	tristate "OMAP TWL4030 BCI charger driver"
 	depends on TWL4030_CORE
+	depends on BROKEN
 	help
 	  Say Y here to enable support for TWL4030 Battery Charge Interface.
 
#4 lore raw

Re: [GIT PULL] battery-2.6.git (a last minute fix)

Hi Anton,

Quoted 11 lines · Anton Vorontsov

On Thu, Oct 28, 2010 at 12:07:10AM -0700, Andrew Morton wrote:
[...]

Quoted 8 lines
Quoted 5 lines

The new driver does not build at its own commit point either, as the missing symbol definition is simply not there. It appears that commit 2e727f1 could not have been build-tested by anyone before it got upstream (let alone boot and functionality tested). As a temporary workaround i'm disabling it in -tip.

Those definitions get added by the MFD tree and used by the battery tree. Things arrived in the wrong order (and, yes, didn't get tested).

Quoted 8 lines

My bad. :-/

Quoted 2 lines

The fix is for Samuel to get a wiggle on with his merge? The -rc1 window is about to slam shut on his fingers anyway.

I guess the best thing for now would be to be safe and to disable the new driver via 'depends on BROKEN', so it won't scare testers away from -rc1.

I'm about to send my pull request to Linus. Should I send this commit revert as part of the pull request, or do you want to do it ?

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
#5 lore raw

Re: [GIT PULL] battery-2.6.git (a last minute fix)

Quoted 16 lines · Samuel Ortiz

Hi Anton,

Quoted 13 lines · Anton Vorontsov

On Thu, Oct 28, 2010 at 12:07:10AM -0700, Andrew Morton wrote:
[...]

Quoted 8 lines
Quoted 5 lines

The new driver does not build at its own commit point either, as the missing symbol definition is simply not there. It appears that commit 2e727f1 could not have been build-tested by anyone before it got upstream (let alone boot and functionality tested). As a temporary workaround i'm disabling it in -tip.

Those definitions get added by the MFD tree and used by the battery tree. Things arrived in the wrong order (and, yes, didn't get tested).

My bad. :-/

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

The fix is for Samuel to get a wiggle on with his merge? The -rc1 window is about to slam shut on his fingers anyway.

I guess the best thing for now would be to be safe and to disable the new driver via 'depends on BROKEN', so it won't scare testers away from -rc1.

I'm about to send my pull request to Linus. Should I send this commit revert as part of the pull request, or do you want to do it ?

Would be great if you do it. Thanks!

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#6 lore raw

Re: [GIT PULL] battery-2.6.git (a last minute fix)

In reply to Anton Vorontsov
Quoted 4 lines

drivers/power/twl4030_charger.c: In function 'twl4030_bci_probe':
drivers/power/twl4030_charger.c:477: warning: overflow in implicit constant conversion drivers/power/twl4030_charger.c:485: warning: overflow in implicit constant conversion make[2]: *** [drivers/power/twl4030_charger.o] Error 1

Here is a fix for these warnings (only show up for 64bit so I missed them, my fault again).

------------ cut -----------
From: Grazvydas Ignotas <[email protected]>
Date: Fri, 29 Oct 2010 00:51:32 +0300
Subject: [PATCH] power_supply: twl4030_charger: fix compilation warnings

Registers are 8bit, so use proper type, fixing following warnings:
twl4030_charger.c:477: warning: overflow in implicit constant conversion twl4030_charger.c:485: warning: overflow in implicit constant conversion

These only show up when building for 64bit target, so I missed them while building only for 32bit ARM.

---
 drivers/power/twl4030_charger.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/power/twl4030_charger.c +3 -3
index ff1f423..07236ae 100644
@@ -414,7 +414,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)
 {
 	struct twl4030_bci *bci;
 	int ret;
-	int reg;
+	u8 reg;
 
 	bci = kzalloc(sizeof(*bci), GFP_KERNEL);
 	if (bci == NULL)
@@ -473,7 +473,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)
 	}
 
 	/* Enable interrupts now. */
-	reg = ~(TWL4030_ICHGLOW | TWL4030_ICHGEOC | TWL4030_TBATOR2 |
+	reg = (u8) ~(TWL4030_ICHGLOW | TWL4030_ICHGEOC | TWL4030_TBATOR2 |
 		TWL4030_TBATOR1 | TWL4030_BATSTS);
 	ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg,
 			       TWL4030_INTERRUPTS_BCIIMR1A);
@@ -482,7 +482,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)
 		goto fail_unmask_interrupts;
 	}
 
-	reg = ~(TWL4030_VBATOV | TWL4030_VBUSOV | TWL4030_ACCHGOV);
+	reg = (u8) ~(TWL4030_VBATOV | TWL4030_VBUSOV | TWL4030_ACCHGOV);
 	ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg,
 			       TWL4030_INTERRUPTS_BCIIMR2A);
 	if (ret < 0)
Signature · 1 line
1.6.3.3
#7 lore raw

Re: -tip: origin tree build failure (battery-2.6.git related)

In reply to Andrew Morton
Quoted 2 lines

Those definitions get added by the MFD tree and used by the battery tree. Things arrived in the wrong order (and, yes, didn't get tested).

I just assumed mfd tree would be merged first and did not indicate there was MFD dependency to Anton, sorry about that.
Below is the patch it depends on.

--------------------------- cut ---------------------------
From: Felipe Balbi <[email protected]>
Date: Fri, 10 Sep 2010 17:10:21 +0200
Subject: i2c: twl: add register defines for pm master module

Some modules already need to talk to at least PROTECT_KEY register, while at that, add defines to the entire register space.

---
 include/linux/i2c/twl.h |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)
include/linux/i2c/twl.h +46 -0
index 6de90bf..4ddffd2 100644
@@ -356,6 +356,52 @@ int twl6030_interrupt_mask(u8 bit_mask, u8 offset);
 #define TWL5031_INTERRUPTS_BCISIHCTRL	0x7
 
 /*----------------------------------------------------------------------*/
+  
+/*
+ * PM Master module register offsets (use TWL4030_MODULE_PM_MASTER)
+ */
+
+#define TWL4030_PM_MASTER_CFG_P1_TRANSITION	0x00
+#define TWL4030_PM_MASTER_CFG_P2_TRANSITION	0x01
+#define TWL4030_PM_MASTER_CFG_P3_TRANSITION	0x02
+#define TWL4030_PM_MASTER_CFG_P123_TRANSITION	0x03
+#define TWL4030_PM_MASTER_STS_BOOT		0x04
+#define TWL4030_PM_MASTER_CFG_BOOT		0x05
+#define TWL4030_PM_MASTER_SHUNDAN		0x06
+#define TWL4030_PM_MASTER_BOOT_BCI		0x07
+#define TWL4030_PM_MASTER_CFG_PWRANA1		0x08
+#define TWL4030_PM_MASTER_CFG_PWRANA2		0x09
+#define TWL4030_PM_MASTER_BACKUP_MISC_STS	0x0b
+#define TWL4030_PM_MASTER_BACKUP_MISC_CFG	0x0c
+#define TWL4030_PM_MASTER_BACKUP_MISC_TST	0x0d
+#define TWL4030_PM_MASTER_PROTECT_KEY		0x0e
+#define TWL4030_PM_MASTER_STS_HW_CONDITIONS	0x0f
+#define TWL4030_PM_MASTER_P1_SW_EVENTS		0x10
+#define TWL4030_PM_MASTER_P2_SW_EVENTS		0x11
+#define TWL4030_PM_MASTER_P3_SW_EVENTS		0x12
+#define TWL4030_PM_MASTER_STS_P123_STATE	0x13
+#define TWL4030_PM_MASTER_PB_CFG		0x14
+#define TWL4030_PM_MASTER_PB_WORD_MSB		0x15
+#define TWL4030_PM_MASTER_PB_WORD_LSB		0x16
+#define TWL4030_PM_MASTER_SEQ_ADD_W2P		0x1c
+#define TWL4030_PM_MASTER_SEQ_ADD_P2A		0x1d
+#define TWL4030_PM_MASTER_SEQ_ADD_A2W		0x1e
+#define TWL4030_PM_MASTER_SEQ_ADD_A2S		0x1f
+#define TWL4030_PM_MASTER_SEQ_ADD_S2A12		0x20
+#define TWL4030_PM_MASTER_SEQ_ADD_S2A3		0x21
+#define TWL4030_PM_MASTER_SEQ_ADD_WARM		0x22
+#define TWL4030_PM_MASTER_MEMORY_ADDRESS	0x23
+#define TWL4030_PM_MASTER_MEMORY_DATA		0x24
+
+#define TWL4030_PM_MASTER_KEY_CFG1		0xc0
+#define TWL4030_PM_MASTER_KEY_CFG2		0x0c
+
+#define TWL4030_PM_MASTER_KEY_TST1		0xe0
+#define TWL4030_PM_MASTER_KEY_TST2		0x0e
+
+#define TWL4030_PM_MASTER_GLOBAL_TST		0xb6
+
+/*----------------------------------------------------------------------*/
 
 /* Power bus message definitions */
 
Signature · 1 line
1.6.3.3