[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2013134.msetbOSBe8@pali-elitebook>
Date: Tue, 06 Dec 2011 00:05:30 +0100
From: Pali Rohár <pali.rohar@...il.com>
To: Felipe Contreras <felipe.contreras@...ia.com>
Cc: linux-main <linux-kernel@...r.kernel.org>,
linux-omap <linux-omap@...r.kernel.org>,
Samuel Ortiz <sameo@...ux.intel.com>,
Aliaksei Katovich <aliaksei.katovich@...ia.com>,
Vladimir Zapolskiy <vz@...ia.com>,
Felipe Contreras <felipe.contreras@...il.com>
Subject: Re: [PATCH] mfd: add bq2415x charger driver
On Tuesday 06 December 2011 00:35:41 Felipe Contreras wrote:
> From: Aliaksei Katovich <aliaksei.katovich@...ia.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@...il.com
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists