From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754640AbdEIFpw convert rfc822-to-8bit (ORCPT ); Tue, 9 May 2017 01:45:52 -0400 Received: from mx6-14.smtp.antispamcloud.com ([95.211.2.226]:54731 "EHLO mx6-14.smtp.antispamcloud.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbdEIFpu (ORCPT ); Tue, 9 May 2017 01:45:50 -0400 X-Greylist: delayed 1135 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 May 2017 01:45:49 EDT Subject: Re: [PATCH] dt-bindings: power: New bindings for ltc3651-charger To: Rob Herring References: <1493966315-15893-1-git-send-email-mike.looijmans@topic.nl> <20170508171206.ajxjbw5mybvrpwss@rob-hp-laptop> CC: , , , , From: Mike Looijmans Organization: TOPIC Message-ID: <1d046814-8a0b-099b-0a5b-b704623e1b92@topic.nl> Date: Tue, 9 May 2017 07:26:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170508171206.ajxjbw5mybvrpwss@rob-hp-laptop> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8BIT X-Originating-IP: [192.168.80.121] X-EXCLAIMER-MD-CONFIG: 9833cda7-5b21-4d34-9a38-8d025ddc3664 X-EXCLAIMER-MD-BIFURCATION-INSTANCE: 0 X-Originating-IP: 37.74.225.130 X-SpamExperts-Domain: topic.nl X-SpamExperts-Username: 37.74.225.128/28 Authentication-Results: antispamcloud.com; auth=pass smtp.auth=37.74.225.128/28@topic.nl X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: SB/global_tokens (2.78418210348e-05) X-Recommended-Action: accept X-Filter-ID: s0sct1PQhAABKnZB5plbIbbvfIHzQjPVmPLZeVYSu3xU9luQrU+8/8qthi+0Jd/W/95+6ZE6dI+d FNTaLLKrTD4PkK8WOoKuw32u9iEtZmisSr42qUwvK7U11fJ5smF5bE7GwnNXTE7JFCR1ojdwNItR GF90x0+b962STkOlEK49MNJBhXqXOs3hdehOgy9S+T2sh4dzMEj6KGt85PH9fGbjO41FyBEqIaDu dcVplPGNaieKxw/vh63RdlaW2Zj1hcQD6Dxo9kokFZNwiacNPxeTCKssqlJePCDBHWfCYUvWOATT vnG+QUCcfrSs6FZc7tZ3vKwSN7Mv0HNteAusUZ8BuYwGqmI8Tx/Ism0pnCcmlWACu0WC7nIKSPYV aBAANeo6Hr4UJMIZEVOGlXeApA3I626B4k1VCg2pmPRu/ttVSg5QiVcaYyzQwMlaaiztsBIIj/l4 JvRPXvUHsT8f8L3upx1n/FUf/NwbTI+uRoXlWvXEyVXmV1DcCGMoc6ig/SVaKi0jvtxxX4zA29pu 2ONYQFX+rhdRbxagFZk9QeU7sEKSfUWHty4XO0JvVoTKX2XX9bIsGDSYq5OAASmskVp/3TgIM4oj TBFr687rGjvGLWY+MgHYxfRtKtuAsj1l++DuIQUs/5JJj4C/n4CILr8EQbc1Bj2DWCrO5gJHZOZc RojozDt311EWh69LdsB7ryn0f8eUyEPD7diIm+mNngZ24itrInQFZPBtVxKxu3Jc5ZM17tXcNFnA aL+DkvzApG7M2OICIeicNQTOE0P6Qm9R4BJZ58JiPXkJGM8Rdws0NlDES5AoumH5pq0HbaC63y83 LNaskX6qkE9b5UyChhZFF7OAN2Ax3sCvX7Q2f8PxJtcVJProrT987X1VDPOqMLc/UXpSdFr49kNT sWm7LHsCV6TDdtit68pQ4Nki0Twku8KT9YgBjFZKfhFqtE9fHH5WyJvLgFDPXfIsGc7fmUuf+eM3 l5KPnbp/eQthjVMEKtVjHOmvvTdxvJ7cgfy+LjKo4uimzD1H3xsHVIeISbhAjsVpbZ29V2YVMRUQ BTU= X-Report-Abuse-To: spam@quarantine2.antispamcloud.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08-05-17 19:12, Rob Herring wrote: > On Fri, May 05, 2017 at 08:38:35AM +0200, Mike Looijmans wrote: >> This adds the devicetree bindings documentation for the LTC3651 battery charger. >> >> Signed-off-by: Mike Looijmans >> --- >> .../bindings/power/supply/ltc3651-charger.txt | 26 ++++++++++++++++++++++ >> 1 file changed, 26 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/power/supply/ltc3651-charger.txt >> >> diff --git a/Documentation/devicetree/bindings/power/supply/ltc3651-charger.txt b/Documentation/devicetree/bindings/power/supply/ltc3651-charger.txt >> new file mode 100644 >> index 0000000..a7dd80f >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/power/supply/ltc3651-charger.txt >> @@ -0,0 +1,26 @@ >> +ltc3651-charger >> + >> +Required properties: >> + - compatible: "lltc,ltc3651-charger" >> + - acpr-gpios: Connect to ACPR output. See remark below. >> + >> +Optional properties: >> + - fault-gpios: Connect to FAULT output. See remark below. >> + - chrg-gpios: Connect to CHRG output. See remark below. > > All the gpios need vendor prefix. Will prefix "lltc," adjust the driver and submit new patches. > >> + >> +The ltc3651 outputs are open-drain type and active low. The driver assumes the >> +GPIO reports "active" when the output is asserted, so if the pins have been >> +connected directly, the GPIO flags should be set to active low also. >> + >> +The driver will attempt to aquire interrupts for all GPIOs. If the system is >> +not capabale of providing that, the driver cannot report changes and userspace >> +will need to periodically read the sysfs attributes to detect changes. > > If these are interrupts, then you should use the interrupt binding > instead (most GPIO controllers are also interrupt controllers). They're GPIO (the driver needs the current state), the use of interrupts is just to detect changes. Similar to gpio-charger for example. Interrupt bindings cannot provide the current state of the line. > >> + >> +Example: >> + >> + charger: battery-charger { >> + compatible = "lltc,ltc3651-charger"; >> + acpr-gpios = <&gpio0 68 GPIO_ACTIVE_LOW>; >> + fault-gpios = <&gpio0 64 GPIO_ACTIVE_LOW>; >> + chrg-gpios = <&gpio0 63 GPIO_ACTIVE_LOW>; >> + }; >> -- >> 1.9.1 >> Kind regards, Mike Looijmans System Expert TOPIC Products Materiaalweg 4, NL-5681 RJ Best Postbus 440, NL-5680 AK Best Telefoon: +31 (0) 499 33 69 79 E-mail: mike.looijmans@topicproducts.com Website: www.topicproducts.com Please consider the environment before printing this e-mail