Commit 1cabd3e0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:
 "Nothing too fancy in the power-supply subsystem this time. There are
  less patches than usual, since I did not have enough time to review
  them in time. The good news is, that all patches have been in
  linux-next for more than two weeks and there are no complicated
  cross-subsystem patchsets this time!

  Summary:

   - at91-reset: add sam9x60 support

   - sc27xx: improve capacity logic

   - goldfish_battery: enhance driver by adding many new properties

   - isp1704: drop platform data and migrate to gpiod

   - misc small fixes and improvements"

* tag 'for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (25 commits)
  power: reset: at91-reset: add support for sam9x60 SoC
  dt-bindings: arm: atmel: add new sam9x60 reset controller binding
  dt-bindings: arm: atmel: add missing samx7 to reset controller
  max17042_battery: fix potential use-after-free on device remove
  power: supply: core: Add a field to support battery max voltage
  dt-bindings: power: supply: Add voltage-max-design-microvolt property
  bq27x00: use cached flags
  power: supply: ds2782: fix possible use-after-free on remove
  power: supply: bq25890: show max charge current/voltage as configured
  power: supply: sc27xx: Fix capacity saving function
  power: supply: sc27xx: Fix the incorrect formula when converting capacity to coulomb counter
  power: supply: sc27xx: Add one property to read charge voltage
  dt-bindings: power: sc27xx: Add one IIO channel to read charge voltage
  drivers: power: supply: goldfish_battery: Add support for reading more properties
  power: supply: charger-manager: Fix trivial language typos
  cpcap-charger: generate events for userspace
  power: supply: remove some duplicated includes
  power: twl4030: fix a missing check of return value
  drivers: power: supply: goldfish_battery: Use tabs for alignment
  drivers: power: supply: goldfish_battery: Fix alignment
  ...
parents 7427e286 655ab0bc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ Its subnodes can be:

RSTC Reset Controller required properties:
- compatible: Should be "atmel,<chip>-rstc".
  <chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3"
  <chip> can be "at91sam9260", "at91sam9g45", "sama5d3" or "samx7"
  it also can be "microchip,sam9x60-rstc"
- reg: Should contain registers location and length
- clocks: phandle to input clock.

+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ Required Properties:

Optional Properties:
 - voltage-min-design-microvolt: drained battery voltage
 - voltage-max-design-microvolt: fully charged battery voltage
 - energy-full-design-microwatt-hours: battery design energy
 - charge-full-design-microamp-hours: battery design capacity
 - precharge-current-microamp: current for pre-charge phase
@@ -48,6 +49,7 @@ Example:
	bat: battery {
		compatible = "simple-battery";
		voltage-min-design-microvolt = <3200000>;
		voltage-max-design-microvolt = <4200000>;
		energy-full-design-microwatt-hours = <5290000>;
		charge-full-design-microamp-hours = <1430000>;
		precharge-current-microamp = <256000>;
+4 −4
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@ Required properties:
  "sprd,sc2731-fgu".
- reg: The address offset of fuel gauge unit.
- battery-detect-gpios: GPIO for battery detection.
- io-channels: Specify the IIO ADC channel to get temperature.
- io-channel-names: Should be "bat-temp".
- io-channels: Specify the IIO ADC channels to get temperature and charge voltage.
- io-channel-names: Should be "bat-temp" or "charge-vol".
- nvmem-cells: A phandle to the calibration cells provided by eFuse device.
- nvmem-cell-names: Should be "fgu_calib".
- monitored-battery: Phandle of battery characteristics devicetree node.
@@ -47,8 +47,8 @@ Example:
			compatible = "sprd,sc2731-fgu";
			reg = <0xa00>;
			battery-detect-gpios = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
			io-channels = <&pmic_adc 5>;
			io-channel-names = "bat-temp";
			io-channels = <&pmic_adc 5>, <&pmic_adc 14>;
			io-channel-names = "bat-temp", "charge-vol";
			nvmem-cells = <&fgu_calib>;
			nvmem-cell-names = "fgu_calib";
			monitored-battery = <&bat>;
+13 −0
Original line number Diff line number Diff line
@@ -44,6 +44,9 @@ enum reset_type {
	RESET_TYPE_WATCHDOG	= 2,
	RESET_TYPE_SOFTWARE	= 3,
	RESET_TYPE_USER		= 4,
	RESET_TYPE_CPU_FAIL	= 6,
	RESET_TYPE_XTAL_FAIL	= 7,
	RESET_TYPE_ULP2		= 8,
};

static void __iomem *at91_ramc_base[2], *at91_rstc_base;
@@ -164,6 +167,15 @@ static void __init at91_reset_status(struct platform_device *pdev)
	case RESET_TYPE_USER:
		reason = "user reset";
		break;
	case RESET_TYPE_CPU_FAIL:
		reason = "CPU clock failure detection";
		break;
	case RESET_TYPE_XTAL_FAIL:
		reason = "32.768 kHz crystal failure detection";
		break;
	case RESET_TYPE_ULP2:
		reason = "ULP2 reset";
		break;
	default:
		reason = "unknown reset";
		break;
@@ -183,6 +195,7 @@ static const struct of_device_id at91_reset_of_match[] = {
	{ .compatible = "atmel,at91sam9g45-rstc", .data = at91sam9g45_restart },
	{ .compatible = "atmel,sama5d3-rstc", .data = sama5d3_restart },
	{ .compatible = "atmel,samx7-rstc", .data = samx7_restart },
	{ .compatible = "microchip,sam9x60-rstc", .data = samx7_restart },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, at91_reset_of_match);
+2 −12
Original line number Diff line number Diff line
@@ -307,22 +307,12 @@ static int fuel_gauge_debug_show(struct seq_file *s, void *data)
	return 0;
}

static int debug_open(struct inode *inode, struct file *file)
{
	return single_open(file, fuel_gauge_debug_show, inode->i_private);
}

static const struct file_operations fg_debug_fops = {
	.open       = debug_open,
	.read       = seq_read,
	.llseek     = seq_lseek,
	.release    = single_release,
};
DEFINE_SHOW_ATTRIBUTE(fuel_gauge_debug);

static void fuel_gauge_create_debugfs(struct axp288_fg_info *info)
{
	info->debug_file = debugfs_create_file("fuelgauge", 0666, NULL,
		info, &fg_debug_fops);
		info, &fuel_gauge_debug_fops);
}

static void fuel_gauge_remove_debugfs(struct axp288_fg_info *info)
Loading