Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0498cf84 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull power supply changes from Sebastian Reichel:
 - Added iPaq h3xxx battery driver
 - Added Broadcom STB reset driver
 - DT support for rx51-battery
 - misc. fixes

* tag 'for-v3.17' of git://git.infradead.org/battery-2.6:
  ipaq_micro_battery: fix sparse non static symbol warning
  power: add driver for battery reading on iPaq h3xxx
  power: twl4030_charger: detect battery presence prior to enabling charger
  power: reset: Add reboot driver for brcmstb
  power_supply: Fix sparse non static symbol warning
  power_supply: Add inlmt,iterm, min/max temp props
  charger: tps65090: Allow charger module to be used when no irq
  power/reset: Fix GPL v2 license string typo
  power: poweroff: gpio: convert to use descriptors
  bq27000: report missing device better.
  bq27x00_battery: Introduce the use of the managed version of kzalloc
  Documentation: DT: Document rx51-battery binding
  rx51_battery: convert to iio consumer
  bq2415x_charger: Fix Atomic Sleep Bug
parents 85417aef 5e37195f
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
Binding for Nokia N900 battery

The Nokia N900 battery status can be read via the TWL4030's A/D converter.

Required properties:
- compatible: Should contain one of the following:
 * "nokia,n900-battery"
- io-channels: Should contain IIO channel specifiers
               for each element in io-channel-names.
- io-channel-names: Should contain the following values:
 * "temp" - The ADC channel for temperature reading
 * "bsi"  - The ADC channel for battery size identification
 * "vbat" - The ADC channel to measure the battery voltage

Example from Nokia N900:

battery: n900-battery {
	compatible = "nokia,n900-battery";
	io-channels = <&twl4030_madc 0>,
		      <&twl4030_madc 4>,
		      <&twl4030_madc 12>;
	io-channel-names = "temp",
			   "bsi",
			   "vbat";
};
+6 −0
Original line number Diff line number Diff line
@@ -118,6 +118,10 @@ relative, time-based measurements.
CONSTANT_CHARGE_CURRENT - constant charge current programmed by charger.
CONSTANT_CHARGE_CURRENT_MAX - maximum charge current supported by the
power supply object.
INPUT_CURRENT_LIMIT - input current limit programmed by charger. Indicates
the current drawn from a charging source.
CHARGE_TERM_CURRENT - Charge termination current used to detect the end of charge
condition.

CONSTANT_CHARGE_VOLTAGE - constant charge voltage programmed by charger.
CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the
@@ -140,6 +144,8 @@ TEMP_ALERT_MAX - maximum battery temperature alert.
TEMP_AMBIENT - ambient temperature.
TEMP_AMBIENT_ALERT_MIN - minimum ambient temperature alert.
TEMP_AMBIENT_ALERT_MAX - maximum ambient temperature alert.
TEMP_MIN - minimum operatable temperature
TEMP_MAX - maximum operatable temperature

TIME_TO_EMPTY - seconds left for battery to be considered empty (i.e.
while battery powers a load)
+7 −0
Original line number Diff line number Diff line
@@ -137,6 +137,13 @@ config BATTERY_COLLIE
	  Say Y to enable support for the battery on the Sharp Zaurus
	  SL-5500 (collie) models.

config BATTERY_IPAQ_MICRO
	tristate "iPAQ Atmel Micro ASIC battery driver"
	depends on MFD_IPAQ_MICRO
	help
	  Choose this option if you want to monitor battery status on
	  Compaq/HP iPAQ h3100 and h3600.

config BATTERY_WM97XX
	bool "WM97xx generic battery driver"
	depends on TOUCHSCREEN_WM97XX=y
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o
obj-$(CONFIG_BATTERY_OLPC)	+= olpc_battery.o
obj-$(CONFIG_BATTERY_TOSA)	+= tosa_battery.o
obj-$(CONFIG_BATTERY_COLLIE)	+= collie_battery.o
obj-$(CONFIG_BATTERY_IPAQ_MICRO) += ipaq_micro_battery.o
obj-$(CONFIG_BATTERY_WM97XX)	+= wm97xx_battery.o
obj-$(CONFIG_BATTERY_SBS)	+= sbs-battery.o
obj-$(CONFIG_BATTERY_BQ27x00)	+= bq27x00_battery.o
+6 −2
Original line number Diff line number Diff line
@@ -840,8 +840,7 @@ static int bq2415x_notifier_call(struct notifier_block *nb,
	if (bq->automode < 1)
		return NOTIFY_OK;

	sysfs_notify(&bq->charger.dev->kobj, NULL, "reported_mode");
	bq2415x_set_mode(bq, bq->reported_mode);
	schedule_delayed_work(&bq->work, 0);

	return NOTIFY_OK;
}
@@ -892,6 +891,11 @@ static void bq2415x_timer_work(struct work_struct *work)
	int error;
	int boost;

	if (bq->automode > 0 && (bq->reported_mode != bq->mode)) {
		sysfs_notify(&bq->charger.dev->kobj, NULL, "reported_mode");
		bq2415x_set_mode(bq, bq->reported_mode);
	}

	if (!bq->autotimer)
		return;

Loading