All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/9] X-Powers Power Supply Improvements
@ 2020-01-05  1:24 Samuel Holland
  2020-01-05  1:24 ` [PATCH v2 1/9] mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile Samuel Holland
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: Samuel Holland @ 2020-01-05  1:24 UTC (permalink / raw)
  To: Chen-Yu Tsai, Sebastian Reichel, Lee Jones, Hans de Goede,
	Oskari Lemmela, Quentin Schulz
  Cc: linux-pm, linux-kernel, linux-sunxi, Samuel Holland

This series adds some improvements to the axp20x* power supply drivers
to better support suspend/resume and use on mobile devices.

The first two patches fix bugs I found while testing the ONLINE control
added in later patches.

Patches 3 and 7 allow userspace to take the power supplies offline.
Patches 4 and 8 allow userspace to control the wakeup behavior.

Patch 9 avoids polling USB VBUS presence when possible. While working on
the RSB driver, I was seeing ~50 transfers per second, while idle and
tracked it down to this VBUS polling (20 reads/second). The polling
often caused the CPU to clock up and back down, which triggered the
remaining transfers (changes to the CPU voltage).

Unfortunately, I don't see a way to avoid the polling when running on
battery (where it matters most), other than to move the polling back to
the USB PHY driver.

Changes since v1:
 - Add patches 1-2
 - Shift value properly in calls to regmap_update_bits (3, 7)
 - Use #ifdef instead of #if to avoid -Wundef warnings (4, 8)
 - Poll once after an IRQ, instead of setting power->online in the IRQ (9)
 - Poll once on resume, in case the state changed during suspend (9)

Samuel Holland (9):
  mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile
  power: supply: axp20x_ac_power: Fix reporting online status
  power: supply: axp20x_ac_power: Allow offlining
  power: supply: axp20x_ac_power: Add wakeup control
  power: supply: axp20x_usb_power: Remove unused device_node
  power: supply: axp20x_usb_power: Use a match structure
  power: supply: axp20x_usb_power: Allow offlining
  power: supply: axp20x_usb_power: Add wakeup control
  power: supply: axp20x_usb_power: Only poll while offline

 drivers/mfd/axp20x.c                    |   2 +-
 drivers/power/supply/axp20x_ac_power.c  | 131 +++++++++++---
 drivers/power/supply/axp20x_usb_power.c | 220 ++++++++++++++++++------
 3 files changed, 276 insertions(+), 77 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2020-01-06  8:35 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-05  1:24 [PATCH v2 0/9] X-Powers Power Supply Improvements Samuel Holland
2020-01-05  1:24 ` [PATCH v2 1/9] mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile Samuel Holland
2020-01-05 10:07   ` Chen-Yu Tsai
2020-01-06  8:36   ` Lee Jones
2020-01-05  1:24 ` [PATCH v2 2/9] power: supply: axp20x_ac_power: Fix reporting online status Samuel Holland
2020-01-05 10:09   ` [linux-sunxi] " Chen-Yu Tsai
2020-01-05 13:00   ` Julian Calaby
2020-01-05 15:27     ` Samuel Holland
2020-01-05  1:24 ` [PATCH v2 3/9] power: supply: axp20x_ac_power: Allow offlining Samuel Holland
2020-01-05 10:11   ` [linux-sunxi] " Chen-Yu Tsai
2020-01-05  1:24 ` [PATCH v2 4/9] power: supply: axp20x_ac_power: Add wakeup control Samuel Holland
2020-01-05 10:24   ` [linux-sunxi] " Chen-Yu Tsai
2020-01-05 10:44     ` Chen-Yu Tsai
2020-01-05  1:24 ` [PATCH v2 5/9] power: supply: axp20x_usb_power: Remove unused device_node Samuel Holland
2020-01-05 10:25   ` Chen-Yu Tsai
2020-01-05  1:24 ` [PATCH v2 6/9] power: supply: axp20x_usb_power: Use a match structure Samuel Holland
2020-01-05 10:34   ` [linux-sunxi] " Chen-Yu Tsai
2020-01-05 17:58     ` Samuel Holland
2020-01-06  2:24       ` Chen-Yu Tsai
2020-01-05  1:24 ` [PATCH v2 7/9] power: supply: axp20x_usb_power: Allow offlining Samuel Holland
2020-01-05 10:40   ` [linux-sunxi] " Chen-Yu Tsai
2020-01-05 17:47     ` Samuel Holland
2020-01-06  2:22       ` Chen-Yu Tsai
2020-01-05  1:24 ` [PATCH v2 8/9] power: supply: axp20x_usb_power: Add wakeup control Samuel Holland
2020-01-05 10:47   ` [linux-sunxi] " Chen-Yu Tsai
2020-01-05  1:24 ` [PATCH v2 9/9] power: supply: axp20x_usb_power: Only poll while offline Samuel Holland
2020-01-06  4:27   ` [linux-sunxi] " Chen-Yu Tsai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.