Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbff4c8e authored by Peter Rosin's avatar Peter Rosin Committed by Sebastian Reichel
Browse files

power: supply: bq24735: allow polling even if there is no ac-detect gpio



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: default avatarPeter Rosin <peda@axentia.se>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 577b1f06
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -27,8 +27,8 @@ Optional properties :
 - ti,external-control : Indicates that the charger is configured externally
 - ti,external-control : Indicates that the charger is configured externally
   and that the host should not attempt to enable/disable charging or set the
   and that the host should not attempt to enable/disable charging or set the
   charge voltage/current.
   charge voltage/current.
 - poll-interval : In case 'interrupts' is not specified, poll AC presence
 - poll-interval : In case 'interrupts' is not specified, poll AC adapter
   on the ti,ac-detect-gpios GPIO with this interval (milliseconds).
   presence with this interval (milliseconds).


Example:
Example:


+1 −1
Original line number Original line Diff line number Diff line
@@ -468,7 +468,7 @@ static int bq24735_charger_probe(struct i2c_client *client,
				client->irq, ret);
				client->irq, ret);
			return ret;
			return ret;
		}
		}
	} else if (charger->status_gpio) {
	} else {
		ret = device_property_read_u32(&client->dev, "poll-interval",
		ret = device_property_read_u32(&client->dev, "poll-interval",
					       &charger->poll_interval);
					       &charger->poll_interval);
		if (ret)
		if (ret)