diff mbox

[1/2] power: supply: bq24735: allow polling even if there is no ac-detect gpio

Message ID 1482355793-16190-2-git-send-email-peda@axentia.se (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Peter Rosin Dec. 21, 2016, 9:29 p.m. UTC
It is possible to verify AC adapter presence via a register read, without
any physical connection to the ACOK pin on the charger. Allow this.

Signed-off-by: Peter Rosin <peda@axentia.se>
---
 Documentation/devicetree/bindings/power/supply/ti,bq24735.txt | 4 ++--
 drivers/power/supply/bq24735-charger.c                        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Rob Herring (Arm) Dec. 22, 2016, 10:42 p.m. UTC | #1
On Wed, Dec 21, 2016 at 10:29:52PM +0100, Peter Rosin wrote:
> It is possible to verify AC adapter presence via a register read, without
> any physical connection to the ACOK pin on the charger. Allow this.
> 
> Signed-off-by: Peter Rosin <peda@axentia.se>
> ---
>  Documentation/devicetree/bindings/power/supply/ti,bq24735.txt | 4 ++--
>  drivers/power/supply/bq24735-charger.c                        | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt b/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt
index efc2c6a78661..de45e1a2a4d9 100644
--- a/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt
+++ b/Documentation/devicetree/bindings/power/supply/ti,bq24735.txt
@@ -27,8 +27,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.
- - poll-interval : In case 'interrupts' is not specified, poll AC presence
-   on the ti,ac-detect-gpios GPIO with this interval (milliseconds).
+ - poll-interval : In case 'interrupts' is not specified, poll AC adapter
+   presence with this interval (milliseconds).
 
 Example:
 
diff --git a/drivers/power/supply/bq24735-charger.c b/drivers/power/supply/bq24735-charger.c
index 4f6275e5cf1c..d8be81203837 100644
--- a/drivers/power/supply/bq24735-charger.c
+++ b/drivers/power/supply/bq24735-charger.c
@@ -468,7 +468,7 @@  static int bq24735_charger_probe(struct i2c_client *client,
 				client->irq, ret);
 			return ret;
 		}
-	} else if (charger->status_gpio) {
+	} else {
 		ret = device_property_read_u32(&client->dev, "poll-interval",
 					       &charger->poll_interval);
 		if (ret)