From: Pavel Machek <pavel@ucw.cz>
To: Stanislav Brabec <utx@penguin.cz>
Cc: Richard Purdie <rpurdie@rpsys.net>,
lenz@cs.wisc.edu, kernel list <linux-kernel@vger.kernel.org>,
Dirk@Opfer-Online.de, arminlitzel@web.de,
Cyril Hrubis <metan@ucw.cz>,
thommycheck@gmail.com,
linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
dbaryshkov@gmail.com, omegamoon@gmail.com, eric.miao@marvell.com,
Andrea Adami <andrea.adami@gmail.com>
Subject: Re: Zaurus suspend saga
Date: Tue, 8 Sep 2009 23:19:33 +0200 [thread overview]
Message-ID: <20090908211933.GB17228@elf.ucw.cz> (raw)
In-Reply-To: <1252329025.1861.6.camel@hammer.suse.cz>
Hi!
> > > c) We rip the whole thing out and stop supporting "offline" charging.
> >
> > How much faster is offline charge, compared to online charging? I have
> > impression that online charging basically does not charge anything...
>
> I think that online charging works, but it seems to be slower. I am not
> sure, whether it is a hardware or software issue. You can control
> charging speed by software, but the final word has the charging
> chip.
Well, overnight charge (online) seems to result in pretty much empty
battery...
> Here are control wires:
> SPITZ_SCP_JK_A: output = turns dummy load to 1 kOhm resistor
> SPITZ_SCP_JK_B: output = high charging current
> SPITZ_SCP_CHRG_ON: output = charging on
> SPITZ_SCP_ADC_TEMP_ON: output = turns battery sensor on/off
> SPITZ_GPIO_CHRG_FULL input = charging complete
> SPITZ_GPIO_AC_IN input = AC adapter is present
Is CHRG_ON pin reversed?
static void spitz_charge(int on)
{
if (on) {
if (sharpsl_pm.flags & SHARPSL_SUSPENDED) {
gpio_set_value(SPITZ_GPIO_JK_B, 1);
gpio_set_value(SPITZ_GPIO_CHRG_ON, 0);
} else {
gpio_set_value(SPITZ_GPIO_JK_B, 0);
gpio_set_value(SPITZ_GPIO_CHRG_ON, 0);
}
} else {
gpio_set_value(SPITZ_GPIO_JK_B, 0);
gpio_set_value(SPITZ_GPIO_CHRG_ON, 1);
}
}
> MAX1111 inputs:
> MAX1111_ACIN_VOLT: Voltage in AC input (after pass of input circuit,
> before tha final diode)
> MAX1111_BATT_TEMP: Battery temperature sensor
> MAX1111_BATT_VOLT: Battery voltage
>
> Here are notes from the design:
> Pre-charge = 102mA
> Fast charge = 680mA
> Fast charge set ON = 105mA
I'm quite confused:
> SPITZ_SCP_JK_B: output = high charging current
Is JK_B active low?
> Iterm = 55mA
>
> Thresholds:
> SPITZ_GPIO_AC_IN: 4.2V (IC charging circuit)
> SPITZ_GPIO_FATAL_BAT: 3.0V (voltage detector IC on battery)
> PXA270 batt fault: 2.8V (voltage on the main non-regulated power)
> CF/SD: 2.8V (voltage required for CF/SD activation, I am
> not sure, why it is done, because 2.8V is
> outside of spec anyway)
> - It would be nice to have "small travel charger heuristic": Turn fast
> charging on, charger "disappears", switch to slow charging, charger
> "appears" => stay in slow charging mode, and retry after some time, or
> after going to suspend, reset the flag when charger is removed.
Yes, I have similar "travel charger" (from single AA in fact), too,
and yes getting that heuristic would be cool. But for now, I'd settle
with /sys control enabling that.
> - sysfs interface for charging would be nice. For example: Cyril has an
> external battery pack and he wants to disable charging of internal
> battery from the external battery.
Yes, more debug info in sysfs and some controls would be nice.
BTW... /sys/class/leds/spitz:amber:charge seems to have life of its
own. I can't manually change the brightness; also changing trigger
does not work -- it still displays charging status. What is going on?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-09-08 21:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-06 5:26 Pavel Machek
2009-09-06 17:03 ` Rafael J. Wysocki
2009-09-06 18:01 ` Stanislav Brabec
2009-09-07 10:04 ` Pavel Machek
2009-09-06 22:29 ` Richard Purdie
2009-09-07 1:06 ` Eric Miao
2009-09-07 11:03 ` Pavel Machek
2009-09-07 11:34 ` Stanislav Brabec
2009-09-07 11:48 ` Russell King - ARM Linux
2009-09-16 12:25 ` Stanislav Brabec
2009-10-02 4:13 ` Pavel Machek
2009-10-02 7:36 ` Joe Perches
2009-09-07 12:05 ` Dmitry Eremin-Solenikov
2009-09-07 11:31 ` Pavel Machek
2009-09-07 13:10 ` Stanislav Brabec
2009-09-07 14:07 ` Richard Purdie
2009-09-07 14:52 ` Eric Miao
2009-09-07 20:36 ` Dmitry Eremin-Solenikov
2009-09-07 14:46 ` Eric Miao
2009-09-08 21:19 ` Pavel Machek [this message]
2009-09-08 21:53 ` Pavel Machek
2009-09-09 9:28 ` Stanislav Brabec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090908211933.GB17228@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=Dirk@Opfer-Online.de \
--cc=andrea.adami@gmail.com \
--cc=arminlitzel@web.de \
--cc=dbaryshkov@gmail.com \
--cc=eric.miao@marvell.com \
--cc=lenz@cs.wisc.edu \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=metan@ucw.cz \
--cc=omegamoon@gmail.com \
--cc=rpurdie@rpsys.net \
--cc=thommycheck@gmail.com \
--cc=utx@penguin.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®