From patchwork Mon Apr 3 20:23:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 746649 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vxkCD0wrdz9rxl for ; Tue, 4 Apr 2017 06:26:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=lechnology.com header.i=@lechnology.com header.b="Q61/sgs8"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751736AbdDCUZM (ORCPT ); Mon, 3 Apr 2017 16:25:12 -0400 Received: from vern.gendns.com ([206.190.152.46]:58959 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbdDCUX4 (ORCPT ); Mon, 3 Apr 2017 16:23:56 -0400 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=eYY7tPfrKZ1PXzsLedE8nzokgCMbV1Qov63eDdE9mz4=; b=Q61/sgs8q0C9Pf0SlQlUO4nLX y1RCseDdwpYJCud85mLDmZ0lLL1SGpXQOzS4c9R6hEZVhUob2P/30pgEhg/CxS7EEF8X1BEYXeqRV YRtbpe1ZLRXI9BN+0dvAWKn3Hppj2yHsx6ALsbWOPTTUUYgKXDwf/TAjNRa/wMhbghoB0ZEIUxKKm DQ3jS2HONm3SLEcLSpUeuFnZEpJbEEZ4b4/AKUpUe8/fBgYLWS2+Z+vzgDZ6Xug57FKsIqXGqnkwa RBhxrmvRCtvcr/2dEs7C5esKUD7oMvadISuf0wbHFgF5fZTGIa9ZbkwS3Ij6/CaysCfH++k8Oa+Br 4WrOSQwRw==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:58154 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.88) (envelope-from ) id 1cv8W0-002nGz-Ed; Mon, 03 Apr 2017 16:23:53 -0400 From: David Lechner To: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: David Lechner , Sebastian Reichel , Rob Herring , Mark Rutland , Sekhar Nori , Kevin Hilman , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: power: supply: New bindings for LEGO MINDSTORMS EV3 battery Date: Mon, 3 Apr 2017 15:23:47 -0500 Message-Id: <1491251029-23256-2-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491251029-23256-1-git-send-email-david@lechnology.com> References: <1491251029-23256-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 - vger.kernel.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: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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>; + };