From patchwork Wed Feb 4 22:14:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Belisko X-Patchwork-Id: 5779851 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 932FABF440 for ; Wed, 4 Feb 2015 22:16:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C00D42024D for ; Wed, 4 Feb 2015 22:16:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A4F2D20268 for ; Wed, 4 Feb 2015 22:16:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965256AbbBDWO4 (ORCPT ); Wed, 4 Feb 2015 17:14:56 -0500 Received: from mail-we0-f173.google.com ([74.125.82.173]:36123 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965755AbbBDWOy (ORCPT ); Wed, 4 Feb 2015 17:14:54 -0500 Received: by mail-we0-f173.google.com with SMTP id w62so4418073wes.4; Wed, 04 Feb 2015 14:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=zOBPz7nDuf1WAAMsSlWpLIU1JxjDNIw1lgo2TRSGzBo=; b=okGLBoYyoqwceAItZcUGzHQ4mfF2gAWnbtOS1NShEXamhalvfWfrKaYn/5D3ntXRB6 zYeLk0eD+5YzjBBQKia4Y1T+2ekGbDoQAeJ8gTJ7YR0KRob2BAOG/yMSt/0af7OZB/az /CHF88dFb13lbGU1lkFcGIIB/KJNQDjne91tEKMtNONx0Uib8Kc5YgJcVk9WAzsfYQNU U3Ob6tPRDy6JbWnrIJMWxuTrGJGLODr5z5R4efIi0JtsjRQAYwauD1qR6Pw5l+/PWSFV a6txai0hOBpn0oDGXOeGIJdvneQo3hiNEM5peoJ9geoA6xeSKDseO2R+Lg0tQ4zAnCRs jE4A== X-Received: by 10.194.122.233 with SMTP id lv9mr803863wjb.95.1423088093140; Wed, 04 Feb 2015 14:14:53 -0800 (PST) Received: from marek.lan (ip-85.163.161.219.o2inet.sk. [85.163.161.219]) by mx.google.com with ESMTPSA id kp1sm4532222wjc.28.2015.02.04.14.14.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 14:14:52 -0800 (PST) From: Marek Belisko To: sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org Cc: mark.rutland@arm.com, tony@atomide.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, hns@goldelico.com, gta04-owner@goldelico.com, Marek Belisko Subject: [PATCH v3 3/6] Documentation: DT: Document twl4030-madc-battery bindings Date: Wed, 4 Feb 2015 23:14:32 +0100 Message-Id: <1423088075-10025-4-git-send-email-marek@goldelico.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423088075-10025-1-git-send-email-marek@goldelico.com> References: <1423088075-10025-1-git-send-email-marek@goldelico.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Marek Belisko --- .../bindings/power_supply/twl4030_madc_battery.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/power_supply/twl4030_madc_battery.txt diff --git a/Documentation/devicetree/bindings/power_supply/twl4030_madc_battery.txt b/Documentation/devicetree/bindings/power_supply/twl4030_madc_battery.txt new file mode 100644 index 0000000..bb3580c --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/twl4030_madc_battery.txt @@ -0,0 +1,43 @@ +twl4030_madc_battery + +Required properties: + - compatible : "ti,twl4030-madc-battery" + - capacity-uah : battery capacity in uAh + - volt-to-capacity-charging-map : list of voltage(mV):level(%) values + for charging calibration (see example) + - volt-to-capacity-discharging-map : list of voltage(mV):level(%) values + for discharging calibration (see example) + - io-channels: Should contain IIO channel specifiers + for each element in io-channel-names. +- io-channel-names: Should contain the following values: + * "temp" - The ADC channel for temperature reading + * "ichg" - The ADC channel for battery charging status + * "vbat" - The ADC channel to measure the battery voltage + +Example: + madc-battery { + compatible = "ti,twl4030-madc-battery"; + capacity-uah = <1200000>; + volt-to-capacity-charging-map = <4200 100>, + <4100 75>, + <4000 55>, + <3900 25>, + <3800 5>, + <3700 2>, + <3600 1>, + <3300 0>; + + volt-to-capacity-discharging-map = <4200 100> + <4100 95>, + <4000 70>, + <3800 50>, + <3700 10>, + <3600 5>, + <3300 0>; + io-channels = <&twl_madc 1>, + <&twl_madc 10>, + <&twl_madc 12>; + io-channel-names = "temp", + "ichg", + "vbat"; + };