lkml.org 
[lkml]   [2011]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mfd: add bq2415x charger driver
Date
On Tuesday 06 December 2011 00:35:41 Felipe Contreras wrote:
> From: Aliaksei Katovich <aliaksei.katovich@nokia.com>
>
> Hi,
>
> The Nokia N900 has a bunch of stuff regarding the battery: bq27x00 to find
> out the status, and isp1704 to detect what kind of charger is connected to
> the USB port. However, that doesn't charge the battery.
>
> That's the job of bq24150. Up until now, this has been done by the closed
> and proprietary BME application from user-space, which sends i2c commands
> directly.
>
> Several people have tried to decipher what it's actually doing, and there
> are some simple user-space scripts that manage to achieve charging:
>
> http://enivax.net/jk/n900/charge21.sh.txt
>
> Aliaksei Katovich already sent a patch series, but they seem to be doing
> something completely different (wrong?).
>
> This simple driver does the work for me. It's doing basically the same as
> the user-space scripts, but a bit more aligned to the spec sheet[1], and a
> bit more understadable. It's a proof of concept, as it doesn't really
> change the voltage or amperage depending on the type of charger as it
> should, but it at least it achieves charging.
>
> I have never writen a driver, so don't hold on the comments :)
>
> Some inspiration from the code of Aliaksei Katovich.
>
> Cheers.
>
> [1] http://www.ti.com/lit/ds/symlink/bq24150.pdf
>

Hello,

I started writing other implementaion of bq2415x charger driver, which should
support also setting usb host mode. Code is still unfinished, but now is
devided into 2 parts: one power_supply driver and one driver which cover all
bq registers. See:

http://atrey.karlin.mff.cuni.cz/~pali/bq2415x/

Felipe Contreras, I think that my implementation is better - it will export
all bq registers (which is needed for hostmode boost) and will also register
regulator interface.

--
Pali Rohár
pali.rohar@gmail.com[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2011-12-06 00:09    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site