Re: [PATCH] power: supply: Add driver for TI BQ2416X battery charger

From: Sebastian Reichel
Date: Thu Mar 23 2017 - 09:54:52 EST


Hi,

On Wed, Mar 22, 2017 at 01:53:19PM +0000, Wojciech Ziemba wrote:
> [...]
>
> >> and a number of knobs for controlling the charging process
> > missing sysfs ABI documentation. Most of them are probably either
> > not needed, or should become standard POWER_SUPPLY_PROP_ properties.
>
> Well, it is up to you. POWER_SUPPLY props are already there.
> If any new POWER_SUPPLY props should be introduced, it is an open question.
> I agree sysfs knobs could be not needed, but many PSY drivers
> still use them. Couldn't them still be useful even if don't fit the model directly?
> Especially for more specialized embedded systems?

Yes they may, they also may not. Let's add them once they are
needed, because adding them means, that they become ABI.

> [...]
>
> >> +- ti,safety-timer: Safety timer. enum:
> >> + - TMR_27MIN (0)
> >> + - TMR_6H (1)
> >> + - TMR_9H (2)
> >> + - TMR_OFF (3)
> > This does not belong into DT. Just always set it to 27 minutes and
> > properly reset the timer in the driver. You will also need a suspend
> > handler, that disables the timer (or wakeup every now and then to
> > reset it).
>
> Do you mean, more flexible safety timer based on minimal 27min reset?
> Will address wakeup in suspend, separately in this driver.

I mean just always use TMR_27MIN in the driver + watchdog to keep
the system charging. You can change the timer to something bigger
in the suspend routine.

-- Sebastian

Attachment: signature.asc
Description: PGP signature