Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759297Ab3CZCZK (ORCPT ); Mon, 25 Mar 2013 22:25:10 -0400 Received: from hqemgate03.nvidia.com ([216.228.121.140]:9384 "EHLO hqemgate03.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758160Ab3CZCZA (ORCPT ); Mon, 25 Mar 2013 22:25:00 -0400 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Mon, 25 Mar 2013 19:24:28 -0700 From: Rhyland Klein To: Grant Likely , Anton Vorontsov CC: David Woodhouse , , , , Rhyland Klein Subject: [REPOST Patch v1 0/3] Add DT Binding for Power-Supply power-supplies property Date: Mon, 25 Mar 2013 22:24:47 -0400 Message-ID: <1364264690-2124-1-git-send-email-rklein@nvidia.com> X-Mailer: git-send-email 1.7.9.5 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1750 Lines: 45 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 -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/