From patchwork Thu Dec 15 12:21:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9476095 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 1AC5E607EE for ; Thu, 15 Dec 2016 12:58:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 038DC285CA for ; Thu, 15 Dec 2016 12:58:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC39A28607; Thu, 15 Dec 2016 12:58:00 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56EC9285CA for ; Thu, 15 Dec 2016 12:58:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752990AbcLOM56 (ORCPT ); Thu, 15 Dec 2016 07:57:58 -0500 Received: from mail-db5eur01on0137.outbound.protection.outlook.com ([104.47.2.137]:42496 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752294AbcLOM54 (ORCPT ); Thu, 15 Dec 2016 07:57:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentiatech.onmicrosoft.com; s=selector1-axentia-se; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SU55nC3XnJIPCIXha3Zmx4KjQYiKsvluVjkUpGj8QiA=; b=RkcfZJgXsCEcGVdZ2ytu4JhpiQCoO6mLv/cAYC9aWdtQaVBdyBTflQSDbHuQ1Fm4vMttXbMgsuXi/6pIGaw0A5/6fPd7F7/wn7ee/QuyHaRzIJoZl1XSVJIUXEihLTp/f/AT5EIRhj/55ptoQAMMRvDzCBWxCF2hWbrumRFqAZ0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from localhost.localdomain (217.210.101.82) by VI1PR0201MB2319.eurprd02.prod.outlook.com (10.168.63.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8; Thu, 15 Dec 2016 12:22:12 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Cc: Peter Rosin , Sebastian Reichel , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, Jon Hunter Subject: [PATCH v3] dt-bindings: power: supply: bq24735: reverse the polarity of ac-detect Date: Thu, 15 Dec 2016 13:21:19 +0100 Message-Id: <1481804479-8711-1-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-Originating-IP: [217.210.101.82] X-ClientProxiedBy: VI1PR1001CA0026.EURPRD10.PROD.OUTLOOK.COM (10.167.204.36) To VI1PR0201MB2319.eurprd02.prod.outlook.com (10.168.63.21) X-MS-Office365-Filtering-Correlation-Id: 024bd702-5591-4134-3579-08d424e4ffdd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:VI1PR0201MB2319; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2319; 3:tP7eOgrFuFOpFIf06QJRnFF3YJPHgkTuk4qPvBtQ2IOqFGjrFlZKI0FsRJd291owlcWterDSOZJo4SD3Xf2EmDnoVe1kVWszV+cZp2RKuqvMPZasLtJW8iqO+1a47WTTfae6aaJPIaMvPk1AmtBSsPoBgePNxOnKMJenjnCTt1OlRm+2VBy749DTbmpE8kzDTL2cmng5jDKGZ6PO8xhixUigzf29fBchfED13l74bGsOmUUS3bnW42bJxShb+QSzMu9FScho5Div0oDum+8b3A==; 25:PexZoXxCgjQlfdR/e3q5Po2aNLrmTkxJctoc5387nQnjPOvKcMKHx0OUegSaVAjdSrdCB7Pk4ZezLiQC+Zmp7U8cPna87qBnH8evWY/ngtVrPCwH1dpM3/rkB6qRUjxDek7OO5CYvOBZOYxu8NEvwN5qy0BkKsY40a6TwkZE8MlzSWztdEtKTLbiAf9GBwYJ001spThq6AV+NGO0C4H5731uNwhsm5RStDE7HlEbWiC9HSyKLmdwWWc/XQA4Ajw8zDlKfJGIYw0Be+15nMRZjMLCiBeXu4Ps/6bOO6ccVsKUPFjyApwHtUMdLpyDyRR1Rwgr1EItMlEGGcPg+XS2TCmzgjqryMcYGHnhIPHbIJ+CLLX4YOptiRRSg+T+xC4KdkGJfwVIYFuglJxUEMt7ZSnVh1odBlvxrdUY+6E/wWSIaKCs8+pfvhLxazb7bwye3EgwcF9xEfMr541wRGZxBA== X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2319; 31:BG6hccdc6851W3VIrmX7xedi1gk5hTq7N5cjV1+1aI9lE1q5MN1OoLwnRucdmSy+EzePcF641hsBOCSqhqE9o3zdNVUh/YS+czXiQtxP2OLU0PSsmGA11FKryhLOkodf2vp3Sb2p8PHyay964VIs9aNDbp7ptDnNGcxTdMTsSd0uJai84LaAqz7W/0k1dJaoi/14WITMOs432YLL43uQ00Y8hkCX3h5KfhRrH6Qp6VJpZw205P2vyYGRyohIgvMyHm4JK8ofgLplcVEUp73jgA==; 4:C4L05ZP+TDCsrROP/I78mevjVSM92rbcDTcXb66pPcPK4Eqx6B52nVzLriJgq5hIzEasWD+VNoSmfB2IzIBAA+UW3NAithtgI6yVovGdgBFhyvynr1uBdfmUFBI4l62xxlT33gKFYfg3nT6eDv1DoSR5jhonPtQUH1+7qGlDrGHSthAf5dNYGib74CTdukd26zdb3EE4i1BIdoQNBf/WLisjr+jNpideQeO/D2VRXbRcTRu3mpW3W8kty4URmkgRA/3MVoFYHZLOh301WPdyNhgdxkS3BM10/9pxlq4xwryga8FjM7meB3CU66s+XNhSO4hxVFXLAbEg/NoJUlyt5ixuXzm//x3SVRaqjRj+xqB32f+BD3l8upCGRg9T+lQPyMJz310XVCRD49PWW+XwjQMUOvAysQLk7InJjBT/vW8OgFeo62PS7lW42yAIDjOYJjCdTLzg9s71KLJYpvtT9ek0saLrQTt5MdAZq9CFME6QI9tJce+91xUmv7zSNOljQubNt9ARbCuSdSJhEzO1mkMbeAMhP6VpEoW315wYujTtWeppIh8GNfLKt2i9mUNr+2wGAoXLO7QLL6NDTS3Te/aJwBV0wKECrXDfjsbzSSh6O06iHoRxRuZGhqetZcl4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123555025)(2016111802025)(20161123564025)(20161123560025)(20161123562025)(6043046)(6072148); SRVR:VI1PR0201MB2319; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0201MB2319; X-Forefront-PRVS: 0157DEB61B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6069001)(6009001)(7916002)(39410400002)(39830400002)(39450400003)(209900001)(199003)(189002)(2361001)(66066001)(2351001)(33646002)(97736004)(189998001)(36756003)(15395725005)(42186005)(48376002)(101416001)(50466002)(50986999)(74482002)(105586002)(47776003)(68736007)(106356001)(6486002)(6512006)(6506006)(50226002)(86362001)(110136003)(4326007)(5003940100001)(6916009)(305945005)(6116002)(81156014)(3846002)(8676002)(81166006)(7736002)(2906002)(5660300001)(92566002)(38730400001)(25786008)(42262002)(6606295002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0201MB2319; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0201MB2319; 23:6+eqIz4Q45kRWQZPvlCi6GzQFFkI3zXXL1oJFqQ?= =?us-ascii?Q?cSLaZw2xryvLpYDTHKFtuliIyOP3vShBI8CXsFX3Syje/5uOK6uxksZcvfkn?= =?us-ascii?Q?3AHO+sPKvm/Aj+OosTIU9ZBZasiG7NZhqBzYfw+PSkjPp+n3GcMUvJ5A+cZS?= =?us-ascii?Q?j1G2M8HVLAGCXFrXM8fDu1rawI0gCqbokqmkj8bgCFN/JoYEF04ohrbica6m?= =?us-ascii?Q?Jxo/b7X54bmxkWr8SLvBeX16GdEOfEkm7E58Zgr95XNW/chhvuPQHOzvajVJ?= =?us-ascii?Q?IC9Ul+5jN3RiVGaEazCvtMNnivYnDUcpLqzNKqiPY2TyWIzs+s+twtJSB2AB?= =?us-ascii?Q?HqQ8a8BbhPmcwtkkDLJxSqQBzwfjorbY6uBqmQ2ySDM6Et+ooOpPxivj9LfL?= =?us-ascii?Q?6IuxlEJYUw+D8+Ta2xVaZsbPYpQq9MfuhSWhjKEfra72ecw4BGx5+iNF29Tl?= =?us-ascii?Q?R7o0wjty2lHBo+ea+PHaoFNla37tidn/ZYl8mGHSViKE8o//da+MqGgIAh4F?= =?us-ascii?Q?7LmAL8a8fr9fZkRY7gJO1i1b99hLkZRYDKevC7BPCURh6sDijskOWMDlJ484?= =?us-ascii?Q?V3B0lnTNKi7+kG70I23Jqig58aGjRd2msco47f2S7wA76Ch6Ehnpn55LfL31?= =?us-ascii?Q?492/fKxbk98rp2ZO7PozoVkNK8PHErzVQ8fg0KL9esWxW5hNI8AirWq6KC2e?= =?us-ascii?Q?ScnUgVQl+BvNSRbdghpvuzmciEBvjLItCs3f24hnaK0RkWISjDin7rjmibDz?= =?us-ascii?Q?/jkjSvrgkyd4Q6hIC2Gut0GI6gHUDxSaE0GDfRO7VSSF5lB/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vHWuDA/X7VQM8yMTih3F2OTd+j49uBUPFgKyuWhtJv+AuTYZ3KHJe4LjIMzMzC4cXa2M5egqBtBUg4ISe3EEI5PkysbpaFXzYHbTYutycF8QsccOEaK/liRs1DzCXO2FkATK7N7tk4xgQ7xDuQ==; 24:U4MY6Bc3ARXLSYYgw0rqIAtFFnr9jYH+B1mbGqu5Xg1bIeO+3a3OLgT4x2uGYze3ERoCYSnyskw3GQatuwgoU+Pkmn/q2yNNeAUGwvqtYOA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2319; 7:g18A6DJ/cZROIl4Uz1oohFfiWR5iNSytVjgHhsDNJb7qM3Jb66S1aD4xVN2BXMIRjydt4l6gFzc6RJZwVFqIo/QRN9ZGLZf8BHIwqb6mnRsZnQq8UE42ISs+3wz5DBUadWSeOlQrbed6I9/ePx3o9qptnZtTXbbXIBDnJApwY/eLxeKb91QKPALiWnPhxk1tB9yo3UiOhmHv8csVpQrPjHxeeIhLIuvIe4hSnb8mfuioTvV0DMIIk1jNzOyuWkLKqZZYEYPDX7Rc0pru53z6MmNbQLTbJzJJGpLpbPYveJdqnSshcl8h78Sv/i33TmafFUdofThZh+lkM5NmO9syefIPPEi5f0E2DNLu5uhlmWU7BEkLh1/X01nkJGC5k1IYkgnNW03c3tPelEQ+chV7Hqqe1p8Cb5yibHgiX5ns6A5u2sON17SGLc9MhTp0ilH05aRDCx12JoK0NrBKqGbLDg== X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2016 12:22:12.0004 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0201MB2319 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ACOK pin on the bq24735 is active-high, of course meaning that when AC is OK the pin is high. However, all Tegra dts files have incorrectly specified active-high even though the signal is inverted on the Tegra boards. This has worked since the Linux driver has also inverted the meaning of the GPIO. Fix this situation by simply specifying in the bindings what everybody else agrees on; that the ti,ac-detect-gpios is active on AC adapter absence. Signed-off-by: Peter Rosin Acked-by: Jon Hunter --- Hi! This patch is the result of this discussion: http://marc.info/?t=148152531800002 I don't like how it changes the one thing that is seems correct, but what to do? Cheers, Peter Documentation/devicetree/bindings/power/supply/ti,bq24735.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt b/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt index 3bf55757ceec..43d56c49455b 100644 --- a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt +++ b/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt @@ -8,8 +8,9 @@ Optional properties : - interrupts : Specify the interrupt to be used to trigger when the AC adapter is either plugged in or removed. - ti,ac-detect-gpios : This GPIO is optionally used to read the AC adapter - presence. This is a Host GPIO that is configured as an input and - connected to the bq24735. + status. This is a Host GPIO that is configured as an input and + connected to the bq24735, typically the ACOK pin (note: the GPIO should + be active on AC adapter absence). - ti,charge-current : Used to control and set the charging current. This value must be between 128mA and 8.128A with a 64mA step resolution. The POR value is 0x0000h. This number is in mA (e.g. 8192), see spec for more information