Re: [PATCH v2 2/3] power: supply: bq24735-charger: optionally poll the ac-detect gpio

From: Sebastian Reichel
Date: Wed Dec 14 2016 - 10:10:39 EST


Hi,

On Wed, Dec 14, 2016 at 12:56:44AM +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 <peda@xxxxxxxxxx>
> ---
>
> [...]
>
> + } else if (charger->status_gpio) {
> + ret = of_property_read_u32(client->dev.of_node,
> + "poll-interval",
> + &charger->poll_interval);

Please use device_property_read_u32() instead.

> [...]

-- Sebastian

Attachment: signature.asc
Description: PGP signature