Skip to content

Add DT Binding for Power-Supply power-supplies property

Rhyland Klein linux-devicetree linux-tegra lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Changes in v1 from the cover letter

- Inverted the logic so that supplies (batteries) contain a list of the supplies (chargers) which supply them.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3power_supply: Define Binding for power-suppliesDocumentation/devicetree/bindings/power_supply/power_supply.txt+23 -00 replies
2/3power: power_supply: Add core support for supplied_fromdrivers/power/power_supply_core.c include/linux/power_supply.h+39 -130 replies
3/3power: power_supply_core: Add support for supplied_fromdrivers/power/power_supply_core.c include/linux/power_supply.h+141 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Patch v1 0/3] Add DT Binding for Power-Supply power-supplies property

This series defines a common way for devicetree initialized power_supplies to define their relationships between chargers and supplicants.

This series adds a supplied_from array to complement the supplied_to array and to allow supplies to define the list of supplies which supply them.

Then once this property is supported, we can use a new property for devicetree to define the relationships between nodes, and read in this property to generate the supplied_from list.

With this logic in place, all drivers need to do to add support for this mechanism, is to store their device tree node in the power_supply struct. They should also handle EPROBE_DEFER properly.

Changes since:
RFC v2:
- Changed to official Patch set rather than RFC
- defined supplied_from char ** array rather than complicated struct device_node related array

RFC v1:
- Inverted the logic so that supplies (batteries) contain a list of the supplies (chargers) which supply them.

Rhyland Klein (3):
power_supply: Define Binding for power-supplies
power: power_supply: Add core support for supplied_from
power: power_supply_core: Add support for supplied_from

 .../bindings/power_supply/power_supply.txt         |   23 +++
 drivers/power/power_supply_core.c                  |  187 ++++++++++++++++++--
 include/linux/power_supply.h                       |    6 +
 3 files changed, 203 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power_supply/power_supply.txt
Signature · 1 line
1.7.9.5