Commit c8192ba4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset changes from Sebastian Reichel:
 - new reset driver for ZTE SoCs
 - add support for sama5d3 reset handling
 - overhaul of twl4030 charger driver
 - misc fixes and cleanups

* tag 'for-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (35 commits)
  bq2415x_charger: Allow to load and use driver even if notify device is not registered yet
  twl4030_charger: fix compile error when TWL4030_MADC not available.
  power: bq24190_charger: Fix charge type sysfs property
  power: Allow compile test of GPIO consumers if !GPIOLIB
  power: Export I2C module alias information in missing drivers
  twl4030_charger: Increase current carefully while watching voltage.
  twl4030_charger: add ac/mode to match usb/mode
  twl4030_charger: add software controlled linear charging mode.
  twl4030_charger: enable manual enable/disable of usb charging.
  twl4030_charger: allow max_current to be managed via sysfs.
  twl4030_charger: distinguish between USB current and 'AC' current
  twl4030_charger: allow fine control of charger current.
  twl4030_charger: split uA calculation into a function.
  twl4030_charger: trust phy to determine when USB power is available.
  twl4030_charger: correctly handle -EPROBE_DEFER from devm_usb_get_phy_by_node
  twl4030_charger: convert to module_platform_driver instead of ..._probe.
  twl4030_charger: use runtime_pm to keep usb phy active while charging.
  rx51-battery: Set name to rx51-battery
  MAINTAINERS: AVS is not maintained via power supply tree
  power: olpc_battery: clean up eeprom read function
  ...
parents 9c6a019c b68c3161
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
What: /sys/class/power_supply/twl4030_ac/max_current
      /sys/class/power_supply/twl4030_usb/max_current
Description:
	Read/Write limit on current which may
	be drawn from the ac (Accessory Charger) or
	USB port.

	Value is in micro-Amps.

	Value is set automatically to an appropriate
	value when a cable is plugged or unplugged.

	Value can the set by writing to the attribute.
	The change will only persist until the next
	plug event.  These event are reported via udev.


What: /sys/class/power_supply/twl4030_usb/mode
Description:
	Changing mode for USB port.
	Writing to this can disable charging.

	Possible values are:
		"auto" - draw power as appropriate for detected
			 power source and battery status.
		"off"  - do not draw any power.
		"continuous"
		       - activate mode described as "linear" in
		         TWL data sheets.  This uses whatever
			 current is available and doesn't switch off
			 when voltage drops.

			 This is useful for unstable power sources
			 such as bicycle dynamo, but care should
			 be taken that battery is not over-charged.

What: /sys/class/power_supply/twl4030_ac/mode
Description:
	Changing mode for 'ac' port.
	Writing to this can disable charging.

	Possible values are:
		"auto" - draw power as appropriate for detected
			 power source and battery status.
		"off"  - do not draw any power.
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ One interrupt per TC channel in a TC block:

RSTC Reset Controller required properties:
- compatible: Should be "atmel,<chip>-rstc".
  <chip> can be "at91sam9260" or "at91sam9g45"
  <chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3"
- reg: Should contain registers location and length

Example:
+1 −0
Original line number Diff line number Diff line
@@ -8093,6 +8093,7 @@ T: git git://git.infradead.org/battery-2.6.git
S:	Maintained
F:	include/linux/power_supply.h
F:	drivers/power/
X:	drivers/power/avs/

PNP SUPPORT
M:	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+4 −5
Original line number Diff line number Diff line
@@ -788,9 +788,8 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
		static struct regulator_consumer_supply usb1v8 = {
			.supply =	"usb1v8",
		};
		static struct regulator_consumer_supply usb3v1[] = {
			{ .supply =	"usb3v1" },
			{ .supply =	"bci3v1" },
		static struct regulator_consumer_supply usb3v1 = {
			.supply =	"usb3v1",
		};

	/* First add the regulators so that they can be used by transceiver */
@@ -818,7 +817,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
				return PTR_ERR(child);

			child = add_regulator_linked(TWL4030_REG_VUSB3V1,
						      &usb_fixed, usb3v1, 2,
						      &usb_fixed, &usb3v1, 1,
						      features);
			if (IS_ERR(child))
				return PTR_ERR(child);
@@ -838,7 +837,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
		if (IS_ENABLED(CONFIG_REGULATOR_TWL4030) && child) {
			usb1v5.dev_name = dev_name(child);
			usb1v8.dev_name = dev_name(child);
			usb3v1[0].dev_name = dev_name(child);
			usb3v1.dev_name = dev_name(child);
		}
	}

+11 −6
Original line number Diff line number Diff line
@@ -333,7 +333,7 @@ config CHARGER_LP8788

config CHARGER_GPIO
	tristate "GPIO charger"
	depends on GPIOLIB
	depends on GPIOLIB || COMPILE_TEST
	help
	  Say Y to include support for chargers which report their online status
	  through a GPIO pin.
@@ -391,26 +391,30 @@ config CHARGER_BQ2415X

config CHARGER_BQ24190
	tristate "TI BQ24190 battery charger driver"
	depends on I2C && GPIOLIB
	depends on I2C
	depends on GPIOLIB || COMPILE_TEST
	help
	  Say Y to enable support for the TI BQ24190 battery charger.

config CHARGER_BQ24257
	tristate "TI BQ24257 battery charger driver"
	depends on I2C && GPIOLIB
	depends on I2C
	depends on GPIOLIB || COMPILE_TEST
	depends on REGMAP_I2C
	help
	  Say Y to enable support for the TI BQ24257 battery charger.

config CHARGER_BQ24735
	tristate "TI BQ24735 battery charger support"
	depends on I2C && GPIOLIB
	depends on I2C
	depends on GPIOLIB || COMPILE_TEST
	help
	  Say Y to enable support for the TI BQ24735 battery charger.

config CHARGER_BQ25890
	tristate "TI BQ25890 battery charger driver"
	depends on I2C && GPIOLIB
	depends on I2C
	depends on GPIOLIB || COMPILE_TEST
	select REGMAP_I2C
	help
	  Say Y to enable support for the TI BQ25890 battery charger.
@@ -462,7 +466,8 @@ config BATTERY_RT5033

config CHARGER_RT9455
	tristate "Richtek RT9455 battery charger driver"
	depends on I2C && GPIOLIB
	depends on I2C
	depends on GPIOLIB || COMPILE_TEST
	select REGMAP_I2C
	help
	  Say Y to enable support for Richtek RT9455 battery charger.
Loading