From patchwork Fri Dec 16 09:44:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9478531 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 4DFC16047D for ; Fri, 16 Dec 2016 21:25:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D50527D4D for ; Fri, 16 Dec 2016 21:25:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DE0928798; Fri, 16 Dec 2016 21:25:25 +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=unavailable 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 6589D27D4D for ; Fri, 16 Dec 2016 21:25:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755886AbcLPVZX (ORCPT ); Fri, 16 Dec 2016 16:25:23 -0500 Received: from mail-db5eur01on0105.outbound.protection.outlook.com ([104.47.2.105]:20352 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755951AbcLPVZU (ORCPT ); Fri, 16 Dec 2016 16:25:20 -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=+5HWqTkLftMSOwvCRaqroxBTwSXBwXe8h43T10CPiWg=; b=W4tt1xu3tVjLNyb82VdaxM7Tf5F7grtiwqvJWATOo9Ja64OclZj0Zhs1BD4I6s5gl0dkOy/uoZKbJ/NuGooT0Q8F3IptbX/vV7Wl0NZbbGBim6piCTmtuz94Pxf9xt1SpdosqERuHC2saBwkHQ1PuaZ4J6SUQ0tpSkY9BI95WhQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from localhost.localdomain (217.210.101.82) by HE1PR0201MB2315.eurprd02.prod.outlook.com (10.168.145.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Fri, 16 Dec 2016 09:45:01 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Cc: Peter Rosin , Sebastian Reichel , Rob Herring , Mark Rutland , Jon Hunter , Stephen Warren , linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v4] dt-bindings: power: supply: bq24735: reverse the polarity of ac-detect Date: Fri, 16 Dec 2016 10:44:00 +0100 Message-Id: <1481881440-13464-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: DB5PR08CA0077.eurprd08.prod.outlook.com (10.166.166.173) To HE1PR0201MB2315.eurprd02.prod.outlook.com (10.168.145.150) X-MS-Office365-Filtering-Correlation-Id: 46065dd8-0c83-42fe-4e16-08d4259835df X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:HE1PR0201MB2315; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0201MB2315; 3:IbUbmPjQPo+MXmubWyk313wDRAFz+jAff4jJDEQaHEjP/QEXqVyl3nHBBOxP6sbYDNu2MwGNrRWjuxVcnj5hWFGi0/bDhGSdTyeOK/M/G/NI5aPdrVwW3gI3VSt8EhwsI2xECsVvNgbcwmnZTsi6DOMrsSP9QmfCtIndH9E9vOV3Rfni+E5f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hcGCXVM1PvfhPUGg3IQzyGZ2MxqHBTMBuK5rvKtPgWe/pcJyVtW4Sax+QkqVhMYxugNIhXdPq/1uYqJYYQ5NsFwd8+0u54t1nBKCqEkOlvYiTJsRPCXZJTSmwgaldYJkJuL0t4fHFPwArEbDKCIsutiEtEVkuqZujMN3BYKdmih8M8gypg2BDJXqucy4G6XUkm+5aGVFkW0y8WhCUpZ9KvYOGQLotIpLBFGU3sg; 4:lCTWQ/Ah5ZF9Lzr0pr0JWKiw0EhbWZlEYR6HgK6xu1JJnFdyamYNdB/W2EY8AUroSENCBbXjBU9HKimBUhkILdw7q8pYh+E3hYHJ8Hlc+aCnzoeCKjzo2FU0KN2sqocp7iwtBjFOjMwGCz+4di2plWdKBuRmsKNg6ztJdz0Qw3+neew7uIR6QISlJg4lk3u+N+OrGwV/Jl0oq4kSeU99RF+58DODGkMysqs53Lo3huKHfyS78hLY2vxTQLK+UCmCCP/krEOfJJWFGhbi2eh936ZsXAO2CLYMEA5HTs7QhEEwHL+ThMO57uFmSV8JZ8ul7nzVAkBWlgfIsxnBfzx67E0X3jxbVdzxNTjH3jTnmvGASkjL4SWKrqxiKBhTDLesU1WYl4UhM1DW0UoIRUgbCTGrH54tGTCEf2mrsm135glu4SciZ/hw0ZDddgYh0QgEmgYI0/Hk1igOi0+YloWiXah7yC9Of+UcucCsKVeD+PVcXLJlH8hhCUpLBk0+dsA9HKQgRHhs8iRP0AQZe5gCXgiSYI7PgXZRD+OqABjePcRsxTsAwM3TRa/EjANyaYAnTHAqkBPNY8pC4uxOwZbzaY5RDhmVoEwIzP87FIsEDXFQlB2mOnL4IevFGJWtisDx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123562025)(20161123555025)(2016111802025)(20161123560025)(20161123564025)(6072148)(6043046); SRVR:HE1PR0201MB2315; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0201MB2315; X-Forefront-PRVS: 01583E185C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(7916002)(39830400002)(39410400002)(39450400003)(209900001)(199003)(189002)(2351001)(68736007)(6486002)(4326007)(42186005)(86362001)(15395725005)(33646002)(50226002)(101416001)(2906002)(6506006)(50986999)(97736004)(2361001)(6512006)(105586002)(81166006)(8676002)(106356001)(81156014)(7736002)(6116002)(92566002)(25786008)(50466002)(3846002)(48376002)(74482002)(189998001)(5003940100001)(305945005)(47776003)(6916009)(66066001)(36756003)(5660300001)(110136003)(38730400001)(42262002)(6606295002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0201MB2315; 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; HE1PR0201MB2315; 23:s7FN3vVEgHM55M+FoT12SH0zJFsN5rshe46VYL7?= =?us-ascii?Q?Gxv97YNyxq2QgLUkO5VLoJ/ACpjOW9DQuZU5CQc+6EO+PSEgMvIyp9qc3OBQ?= =?us-ascii?Q?8OfzxI3T2Oxcy9afi+uKJG7CA3Az8Z8pnr2SAuZzkIcE7N4GxRwPvQgqWXBA?= =?us-ascii?Q?8wPQB3o/tdmcAu2Lk1W6oDFsMPqUqSfFzKzLeHlCSkzf5Z/+83dbnsApm9s3?= =?us-ascii?Q?mg8qdoxinM7HIAZqhthp500sopbZN8vMvbbgyIcjG/ffN3f8LjfEbYSZSYrj?= =?us-ascii?Q?VTPpM9qAq6w8676i4Tk4tSguxsD4JFY/bwZPqrXfoG73vwB4Qla7MVhLIkOI?= =?us-ascii?Q?wAPW7jsczC1dk4DXLV5NruWEllJ+z5WXu+lSv/WdWGGktDyns3tOltuq9uWC?= =?us-ascii?Q?k3gjULFfvFN5W09KtSz66+HLC0Kky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HX9QcfWhHoxdm4srhUkXY2aS94cef6Fvk2HJRUh3eWyBnCPfBzUzVQ31O3CuwwoFDprX4R0LAmhWd1dVVTVX57VlBWADVi9nPczei60U1aByufz9srTFbxRw5iQv9mNzySjDiY2L2gzHSyjcSfhLNaKH8vunoGVicT9o5px4w2N71Nd86lNpdfu1iy20hGA5+8Vg== X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2016 09:45:01.9172 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0201MB2315 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 --- Documentation/devicetree/bindings/power/supply/ti,bq24735.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Hi! v3 -> v4 changes: - improve the bindings text in the spirit of remarks from Jon Hunter (There were no v1 nor v2, I made a mistake and started from v3 this time.) 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, peda diff --git a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt b/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt index 3bf55757ceec..c95e16e2dc56 100644 --- a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt +++ b/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt @@ -8,8 +8,10 @@ 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 ACOK pin on the bq24735. Note: for backwards compatibility reasons, + the GPIO must be active on AC adapter absence despite ACOK being active + (high) on AC adapter presence. - 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