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

Commit 7992893c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:

 - alternative reset driver for new at91 SoCs

 - misc fixes

* tag 'for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
  sbs-battery: fix power status when battery charging near dry
  power: ipaq-micro-battery: freeing the wrong variable
  power/max8925: freeing wrong variable
  power: reset: at91-shdwc: add new shutdown controller driver
  ARM: dts: at91: shdwc binding: add new shutdown controller documentation
parents 6eb59af5 4a99fa06
Loading
Loading
Loading
Loading
+59 −0
Original line number Diff line number Diff line
@@ -151,6 +151,65 @@ Example:
		clocks = <&clk32k>;
	};

SHDWC SAMA5D2-Compatible Shutdown Controller

1) shdwc node

required properties:
- compatible: should be "atmel,sama5d2-shdwc".
- reg: should contain registers location and length
- clocks: phandle to input clock.
- #address-cells: should be one. The cell is the wake-up input index.
- #size-cells: should be zero.

optional properties:

- debounce-delay-us: minimum wake-up inputs debouncer period in
  microseconds. It's usually a board-related property.
- atmel,wakeup-rtc-timer: boolean to enable Real-Time Clock wake-up.

The node contains child nodes for each wake-up input that the platform uses.

2) input nodes

Wake-up input nodes are usually described in the "board" part of the Device
Tree. Note also that input 0 is linked to the wake-up pin and is frequently
used.

Required properties:
- reg: should contain the wake-up input index [0 - 15].

Optional properties:
- atmel,wakeup-active-high: boolean, the corresponding wake-up input described
  by the child, forces the wake-up of the core power supply on a high level.
  The default is to be active low.

Example:

On the SoC side:
	shdwc@f8048010 {
		compatible = "atmel,sama5d2-shdwc";
		reg = <0xf8048010 0x10>;
		clocks = <&clk32k>;
		#address-cells = <1>;
		#size-cells = <0>;
		atmel,wakeup-rtc-timer;
	};

On the board side:
	shdwc@f8048010 {
		debounce-delay-us = <976>;

		input@0 {
			reg = <0>;
		};

		input@1 {
			reg = <1>;
			atmel,wakeup-active-high;
		};
	};

Special Function Registers (SFR)

Special Function Registers (SFR) manage specific aspects of the integrated
+5 −0
Original line number Diff line number Diff line
@@ -2048,6 +2048,11 @@ M: Nicolas Ferre <nicolas.ferre@atmel.com>
S:	Supported
F:	drivers/tty/serial/atmel_serial.c

ATMEL AT91 SAMA5D2-Compatible Shutdown Controller
M:	Nicolas Ferre <nicolas.ferre@atmel.com>
S:	Supported
F:	drivers/power/reset/at91-sama5d2_shdwc.c

ATMEL SAMA5D2 ADC DRIVER
M:	Ludovic Desroches <ludovic.desroches@atmel.com>
L:	linux-iio@vger.kernel.org
+1 −1
Original line number Diff line number Diff line
@@ -261,7 +261,7 @@ static int micro_batt_probe(struct platform_device *pdev)
	return 0;

ac_err:
	power_supply_unregister(micro_ac_power);
	power_supply_unregister(micro_batt_power);
batt_err:
	cancel_delayed_work_sync(&mb->update);
	destroy_workqueue(mb->wq);
+5 −5
Original line number Diff line number Diff line
@@ -540,14 +540,14 @@ static int max8925_power_probe(struct platform_device *pdev)
	info->usb = power_supply_register(&pdev->dev, &usb_desc, &psy_cfg);
	if (IS_ERR(info->usb)) {
		ret = PTR_ERR(info->usb);
		goto out_usb;
		goto out_unregister_ac;
	}
	info->usb->dev.parent = &pdev->dev;

	info->battery = power_supply_register(&pdev->dev, &battery_desc, NULL);
	if (IS_ERR(info->battery)) {
		ret = PTR_ERR(info->battery);
		goto out_battery;
		goto out_unregister_usb;
	}
	info->battery->dev.parent = &pdev->dev;

@@ -560,9 +560,9 @@ static int max8925_power_probe(struct platform_device *pdev)

	max8925_init_charger(chip, info);
	return 0;
out_battery:
	power_supply_unregister(info->battery);
out_usb:
out_unregister_usb:
	power_supply_unregister(info->usb);
out_unregister_ac:
	power_supply_unregister(info->ac);
out:
	return ret;
+8 −0
Original line number Diff line number Diff line
@@ -30,6 +30,14 @@ config POWER_RESET_AT91_RESET
	  This driver supports restart for Atmel AT91SAM9 and SAMA5
	  SoCs

config POWER_RESET_AT91_SAMA5D2_SHDWC
	tristate "Atmel AT91 SAMA5D2-Compatible shutdown controller driver"
	depends on ARCH_AT91 || COMPILE_TEST
	default SOC_SAMA5
	help
	  This driver supports the alternate shutdown controller for some Atmel
	  SAMA5 SoCs. It is present for example on SAMA5D2 SoC.

config POWER_RESET_AXXIA
	bool "LSI Axxia reset driver"
	depends on ARCH_AXXIA
Loading