Commit 5a120391 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-v3.9' of git://git.infradead.org/battery-2.6

Pull battery updates from Anton Vorontsov:
 "Four new drivers:

   - goldfish_battery:

     This is Android Emulator battery driver.  Originally from Google,
     but Intel folks reshaped it for mainline

   - pm2301_charger:

     A new driver for ST-Ericsson 2301 Power Management chip, uses
     AB8500 battery management core

   - qnap-poweroff:

     The driver adds poweroff functionality for QNAP NAS boxes

   - restart-poweroff:

     A generic driver that implements 'power off by restarting'.  The
     actual poweroff functionality is implemented through a bootloader,
     so Linux' task is just to restart the box.  The driver is useful on
     Buffalo Linkstation LS-XHL and LS-CHLv2 boards.  Andrew Lunn worked
     on submitting the driver (as well as qnap-poweroff above).

  Additionally:

   - A lot of fixes for ab8500 drivers.  This is a part of efforts of
     syncing internal ST-Ericsson development tree with the mainline.
     Lee Jones @ Linaro worked on compilation and reshaping these
     series.

   - New health properties for the power supplies: "Watchdog timer
     expire" and "Safety timer expire"

   - As usual, a bunch of fixes/cleanups here and there"

* tag 'for-v3.9' of git://git.infradead.org/battery-2.6: (81 commits)
  bq2415x_charger: Add support for offline and 100mA mode
  generic-adc-battery: Fix forever loop in gab_remove()
  goldfish_battery: Add missing GENERIC_HARDIRQS dependency
  da9030_battery: Include notifier.h
  bq27x00_battery: Fix reporting battery temperature
  power/reset: Remove newly introduced __dev* annotations
  lp8727_charger: Small cleanup in naming
  ab8500_btemp: Demote initcall sequence
  ds2782_battery: Add power_supply_changed() calls for proper uevent support
  power: Add battery driver for goldfish emulator
  u8500-charger: Delay for USB enumeration
  ab8500-bm: Remove individual [charger|btemp|fg|chargalg] pdata structures
  ab8500-charger: Do not touch VBUSOVV bits
  ab8500-fg: Use correct battery charge full design
  pm2301: LPN mode control support
  pm2301: Enable vbat low monitoring
  ab8500-bm: Flush all work queues before suspending
  ab8500-fg: Go to INIT_RECOVERY when charger removed
  ab8500-charger: Add support for autopower on AB8505 and AB9540
  abx500-chargalg: Add new sysfs interface to get current charge status
  ...

Fix up fairly straightforward conflicts in the ab8500 driver.  But since
it seems to be ARM-specific, I can't even compile-test the result..
parents c560dc87 ac6324e7
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
* QNAP Power Off

QNAP NAS devices have a microcontroller controlling the main power
supply. This microcontroller is connected to UART1 of the Kirkwood and
Orion5x SoCs. Sending the charactor 'A', at 19200 baud, tells the
microcontroller to turn the power off. This driver adds a handler to
pm_power_off which is called to turn the power off.

Required Properties:
- compatible: Should be "qnap,power-off"

- reg: Address and length of the register set for UART1
- clocks: tclk clock
+8 −0
Original line number Diff line number Diff line
* Restart Power Off

Buffalo Linkstation LS-XHL and LS-CHLv2, and other devices power off
by restarting and letting u-boot keep hold of the machine until the
user presses a button.

Required Properties:
- compatible: Should be "restart-poweroff"
+16 −0
Original line number Diff line number Diff line
@@ -7612,6 +7612,22 @@ F: Documentation/backlight/lp855x-driver.txt
F:	drivers/video/backlight/lp855x_bl.c
F:	include/linux/platform_data/lp855x.h

TI LP8727 CHARGER DRIVER
M:	Milo Kim <milo.kim@ti.com>
S:	Maintained
F:	drivers/power/lp8727_charger.c
F:	include/linux/platform_data/lp8727.h

TI LP8788 MFD DRIVER
M:	Milo Kim <milo.kim@ti.com>
S:	Maintained
F:	drivers/iio/adc/lp8788_adc.c
F:	drivers/leds/leds-lp8788.c
F:	drivers/mfd/lp8788*.c
F:	drivers/power/lp8788-charger.c
F:	drivers/regulator/lp8788-*.c
F:	include/linux/mfd/lp8788*.h

TI TWL4030 SERIES SOC CODEC DRIVER
M:	Peter Ujfalusi <peter.ujfalusi@ti.com>
L:	alsa-devel@alsa-project.org (moderated for non-subscribers)
+6 −8
Original line number Diff line number Diff line
@@ -750,6 +750,12 @@ static struct resource ab8500_charger_resources[] = {
		.end = AB8500_INT_CH_WD_EXP,
		.flags = IORESOURCE_IRQ,
	},
	{
		.name = "VBUS_CH_DROP_END",
		.start = AB8500_INT_VBUS_CH_DROP_END,
		.end = AB8500_INT_VBUS_CH_DROP_END,
		.flags = IORESOURCE_IRQ,
	},
};

static struct resource ab8500_btemp_resources[] = {
@@ -1012,40 +1018,32 @@ static struct mfd_cell ab8500_bm_devs[] = {
		.of_compatible = "stericsson,ab8500-charger",
		.num_resources = ARRAY_SIZE(ab8500_charger_resources),
		.resources = ab8500_charger_resources,
#ifndef CONFIG_OF
		.platform_data = &ab8500_bm_data,
		.pdata_size = sizeof(ab8500_bm_data),
#endif
	},
	{
		.name = "ab8500-btemp",
		.of_compatible = "stericsson,ab8500-btemp",
		.num_resources = ARRAY_SIZE(ab8500_btemp_resources),
		.resources = ab8500_btemp_resources,
#ifndef CONFIG_OF
		.platform_data = &ab8500_bm_data,
		.pdata_size = sizeof(ab8500_bm_data),
#endif
	},
	{
		.name = "ab8500-fg",
		.of_compatible = "stericsson,ab8500-fg",
		.num_resources = ARRAY_SIZE(ab8500_fg_resources),
		.resources = ab8500_fg_resources,
#ifndef CONFIG_OF
		.platform_data = &ab8500_bm_data,
		.pdata_size = sizeof(ab8500_bm_data),
#endif
	},
	{
		.name = "ab8500-chargalg",
		.of_compatible = "stericsson,ab8500-chargalg",
		.num_resources = ARRAY_SIZE(ab8500_chargalg_resources),
		.resources = ab8500_chargalg_resources,
#ifndef CONFIG_OF
		.platform_data = &ab8500_bm_data,
		.pdata_size = sizeof(ab8500_bm_data),
#endif
	},
};

+4 −9
Original line number Diff line number Diff line
@@ -915,15 +915,13 @@ static int pm860x_battery_probe(struct platform_device *pdev)
	info->irq_cc = platform_get_irq(pdev, 0);
	if (info->irq_cc <= 0) {
		dev_err(&pdev->dev, "No IRQ resource!\n");
		ret = -EINVAL;
		goto out;
		return -EINVAL;
	}

	info->irq_batt = platform_get_irq(pdev, 1);
	if (info->irq_batt <= 0) {
		dev_err(&pdev->dev, "No IRQ resource!\n");
		ret = -EINVAL;
		goto out;
		return -EINVAL;
	}

	info->chip = chip;
@@ -957,7 +955,7 @@ static int pm860x_battery_probe(struct platform_device *pdev)

	ret = power_supply_register(&pdev->dev, &info->battery);
	if (ret)
		goto out;
		return ret;
	info->battery.dev->parent = &pdev->dev;

	ret = request_threaded_irq(info->irq_cc, NULL,
@@ -984,8 +982,6 @@ out_coulomb:
	free_irq(info->irq_cc, info);
out_reg:
	power_supply_unregister(&info->battery);
out:
	kfree(info);
	return ret;
}

@@ -993,10 +989,9 @@ static int pm860x_battery_remove(struct platform_device *pdev)
{
	struct pm860x_battery_info *info = platform_get_drvdata(pdev);

	power_supply_unregister(&info->battery);
	free_irq(info->irq_batt, info);
	free_irq(info->irq_cc, info);
	kfree(info);
	power_supply_unregister(&info->battery);
	platform_set_drvdata(pdev, NULL);
	return 0;
}
Loading