From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934617AbcLMTbJ (ORCPT ); Tue, 13 Dec 2016 14:31:09 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:34075 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933760AbcLMTaO (ORCPT ); Tue, 13 Dec 2016 14:30:14 -0500 Date: Tue, 13 Dec 2016 13:30:09 -0600 From: Rob Herring To: Peter Rosin Cc: linux-kernel@vger.kernel.org, Sebastian Reichel , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 2/3] power: supply: bq24735-charger: optionally poll the ac-detect gpio Message-ID: <20161213193009.5cqyaii3gjrttqyk@rob-hp-laptop> References: <1481540424-19293-1-git-send-email-peda@axentia.se> <1481540424-19293-3-git-send-email-peda@axentia.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481540424-19293-3-git-send-email-peda@axentia.se> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 12, 2016 at 12:00:23PM +0100, Peter Rosin wrote: > If the ac-detect gpio does not support interrupts, provide a fallback > to poll the gpio at a configurable interval. > > Signed-off-by: Peter Rosin > --- > .../bindings/power/supply/ti,bq24735.txt | 2 + > drivers/power/supply/bq24735-charger.c | 50 +++++++++++++++++++--- > 2 files changed, 47 insertions(+), 5 deletions(-) > > diff --git a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt b/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt > index 3bf55757ceec..59c4dde589cf 100644 > --- a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt > +++ b/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt > @@ -25,6 +25,8 @@ Optional properties : > - ti,external-control : Indicates that the charger is configured externally > and that the host should not attempt to enable/disable charging or set the > charge voltage/current. > + - ti,poll-interval-ms : In case there is no interrupts specified, poll AC > + presense on the ti,ac-detect-gpios GPIO with this interval. We already have poll-interval and cm-poll-interval properties. Just use poll-interval here. Rob