Hello Michael,

On Thu, 31 Mar 2016 08:41:57 +0200 Michael Haas wrote:
> Hello,
> 
> (adding Bruno to CC)

Thanks for CCing, as I currently catch up with mailing list rather
sporadically!

> On 03/31/2016 08:24 AM, Chen-Yu Tsai wrote:
> >>
> >> Is anyone working on that? If not, I'll get started.  
> > 
> > There was an attempt some time ago:
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2014-October/295547.html
> >   
> 
> 
> Bruno had submitted a new version a year later:
> 
> http://comments.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/17980
> 
> There was also a different patchset by Siarhei Siamashka:
> 
> https://groups.google.com/forum/#!topic/linux-sunxi/u4Rwo630MnY
> 
> Bruno,
> 
> can you comment on the state of the patchset? I'd be happy to pick up
> where you left off.

Currently I don't have enough spare time to (actively) work on the patch
set, so feel free to pick up!

With recent additions of support for other AXP variants some porting
work has to be done (not sure I published my latest porting attempts
with some rework to adapt to Hans's axp20x_usb_power.c) and I won't have
time/access to right device to check before mid April.

> >> CC'ing Hans as he implemented axp20x_usb_power.c.  
> > 
> > IIRC, Hans previously said that the acin and vbus supplies should be handled
> > by separate power supply drivers. ACIN is easy to do. Just port the VBUS 
> > one.
> >   
> 
> Yeah, that is very straightforward.

Just remember that some devices short-cut ACIN and VBUS, thus the ACIN
driver should only load when the AXP status bit indicates they are
distinct (maybe also having device-tree flag to indicate connector
presence when not short-cutted).

> > The charger would likely be another separate driver, either combined or
> > separate from the fuel gauge (charge level) driver.  

One thing I explicitly left aside was "estimating battery capacity", the
original 3.4.x code included some heuristics for that with saving
intermediate values to AXP's registers (data registers kept alive as
long as power was present).

Gauge and charger should be a single driver, especially when capacity
estimation comes into play. Interesting is the part of adjusting charge
current based on AC/VBUS power source and taking VBUS's max-current into
account.


The RTC battery charger though can be a mostly hidden driver as all it
needs is some settings from device-tree (voltage/current) and has no
data to report. Letting the user tune voltage/current or enable/disable
the charger is a matter of taste. From my cubietruck's behavior it seems
as if charger enablement might have an impact of rtc battery's
discharge rate while device is powered-off.

Best,
bruno

> I agree.
> 
> Best
> 
> Michael

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to