From patchwork Tue Apr 11 21:05:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 9676089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F84C60234 for ; Tue, 11 Apr 2017 21:09:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74931284BC for ; Tue, 11 Apr 2017 21:09:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6808228550; Tue, 11 Apr 2017 21:09:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1E918284BC for ; Tue, 11 Apr 2017 21:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2ejq1nkYJlP9SZwyY5p8pB7OzATMHcmpQGI5nu1vYF8=; b=fyMJ0mO6DiQO+lGVaq+OZ4oA2f shOnNj4skgAp0HIipJuczdWoVw2ooewqkq+1DdQhCBW1vefEgAhP0xk77iPEi8gzucABoEgPnKZd9 ZghmG9TW4Bd3iU5018wkvVtzx6e5Ir2t0rZaxrk1/9+djDlSjGw9r3sNUmNmAqXLoZLRBNPWMWdY8 mTbSps8SfTpfOEUQ65nMGw2hAvECYcHyHBw/lGJ9xOUJSXz+Ni11PumB0upi2YWNe5sOLOz5+lgS0 F03i/nmy+fCuCtyjpXj9R3oBceBYilyTlZRk96TQLL8Ug9KAZQUlnW8wavQoHvtwwRIhOVpg6GZkZ CszLoNXw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cy330-0006fS-1T; Tue, 11 Apr 2017 21:09:58 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cy32r-0006UO-DE for linux-arm-kernel@bombadil.infradead.org; Tue, 11 Apr 2017 21:09:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ft+bKpwHCTmC5n/EohmfDHC++8Xbhg1ec0YPwhN0QYU=; b=TA/uBVsts6mcN+3ezAvGIIuI5 9IS5BRZVzPQkcgYQOSHlPys75exC4VQ+/QY0ipAu3Ek7ptDdMbOITrKw1y4rxs4s3Mk/nmsuTBtN7 /wRXZ3NVq84wclmpw+e4oPdkXzMAeCf+bxkw7W60uapa0ucGE9OVON72relSZJn7oaOHtOUw4UQpf wh5YnUPQctAKNGIVWMtQCIzCQqOU3oA8bh2dpfPKldPktXFAfeXKLGiyu+jy3CJt967wprbydv52x FXbx+Nud0E6l1Ig4n0CsfHk8EB8kmTsnIMDbKUte+GAu/7z+Fz1YQpXEl2NmXf61hLU0XexYE5NzS 7hJF6pm6w==; Received: from vern.gendns.com ([206.190.152.46]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cy32q-0007J1-2y for linux-arm-kernel@lists.infradead.org; Tue, 11 Apr 2017 21:09:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ft+bKpwHCTmC5n/EohmfDHC++8Xbhg1ec0YPwhN0QYU=; b=b7WVlqg9WzunnoPWQkfklR38a LhcHLqgIsWpRryN2Lk9SiMLT70eHsWpeNSoMuJOA++A4MwbkgN52B8wqgMjalGeXmpE0equLjvEcd kIIW+ClP05gH8yjNsE6A04l75GoseksgPq2xoDHgjsfcr66aMtz5mv6BFA0w1A5hrBICMivXtktlF O+F39AJsJcdq0rzeSPHmoLXTRRkOjArPpKdfL36x++9/+wJmeAmT/GhykpmzYWXPHvchDyStle4yf 2xXa4mH6bXYPqHs454GzobEfuwIWd1gWtBcll1PZxzWCNiYa+BY/wW5tEXfrLpmOt+o8LLW4d94VF iz7YNyJUA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:58146 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.88) (envelope-from ) id 1cy2z7-0005wa-3E; Tue, 11 Apr 2017 17:05:57 -0400 From: David Lechner To: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/3] dt-bindings: power: supply: New bindings for LEGO MINDSTORMS EV3 battery Date: Tue, 11 Apr 2017 16:05:21 -0500 Message-Id: <1491944723-32174-2-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491944723-32174-1-git-send-email-david@lechnology.com> References: <1491944723-32174-1-git-send-email-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170411_170948_199315_D4F6ABDD X-CRM114-Status: GOOD ( 10.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Kevin Hilman , Sekhar Nori , David Lechner , Sebastian Reichel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This add a new device tree binding for LEGO MINDSTORMS EV3 battery. The EV3 has some built-in capability for monitoring the attached battery. Signed-off-by: David Lechner Acked-by: Rob Herring --- .../bindings/power/supply/lego_ev3_battery.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/lego_ev3_battery.txt diff --git a/Documentation/devicetree/bindings/power/supply/lego_ev3_battery.txt b/Documentation/devicetree/bindings/power/supply/lego_ev3_battery.txt new file mode 100644 index 0000000..5485633 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/lego_ev3_battery.txt @@ -0,0 +1,21 @@ +LEGO MINDSTORMS EV3 Battery +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +LEGO MINDSTORMS EV3 has some built-in capability for monitoring the battery. +It uses 6 AA batteries or a special Li-ion rechargeable battery pack that is +detected by a key switch in the battery compartment. + +Required properties: + - compatible: Must be "lego,ev3-battery" + - io-channels: phandles to analog inputs for reading voltage and current + - io-channel-names: Must be "voltage", "current" + - rechargeable-gpios: phandle to the rechargeable battery indication gpio + +Example: + + battery { + compatible = "lego,ev3-battery"; + io-channels = <&adc 4>, <&adc 3>; + io-channel-names = "voltage", "current"; + rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>; + };