Posts

Showing posts with the label battery

August status.

Here's short status: 1. Audio is working, will try to get it into 2.6.36-2.6.37 mainline kernel 2. Battery driver is merged upstream, unfortunately Ben Dooks ingores my patches for some reason, and appropriate rx1950-specific part will not be merged into 2.6.36 :( 3. I got DMA working for s3cmci driver. The problem was in autoreload feature of s3c24xx DMA engine -- MCI doesn't like it for some reason. I rewrote driver to avoid usage of autoreload - and now it's working fine with s3cmci and s3c24xx-i2s drivers, tested on s3c2410 and s3c2442 SoCs

Battery monitor

I'm working on kernel for rx1950 in parallel with userspace work. Since next step is improved battery driver, I've spent couple of hours to create following app . It's simple battery monitor with logging capability - I need some logs to get U,I(t) battery dependencies, as I don't believe windows driver, it seems that it displays battery level applying some heuristic - I don't see direct correlation between battery voltage/current and level displayed by windows driver. P.S. I've sent rx1950 patches upstream on 20 of March and still no responce. I'm a bit disappointed - does it really take so long to review patch series?

Lenovo 3000 N100 and ACPI

There was a bug in BIOS of my laptop that annoyed me for long time: In two words, after resume from hibernate (suspend to disk) fan sticks to the one state. I.e. it's always working (annoying but not dangerous), or it's always stopped (dangerous, can cause overheat) - it's state is not depend on CPU temperature. Here's some links about it: http://bugzilla.kernel.org/show_bug.cgi?id=10223 https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/114312 Zhang Rui (thanks to him!) pointed right direction: he provided customized DSDT table with extra debug output in _TMP method. I've tried it, and it showed that one of two thermal sensors shows wrong info after resume. So I wrote new _TMP method that uses only one thermal sensor. There was one more issue in BIOS - /proc/acpi/battery/BAT1/{info,state} shows hardcoded values, and doesn't perform real query to the smart battery. I've googled a little bit and found this: http://hughsient.livejournal.com/588...

Power management issues

It seems that code that puts rx1950 into sleep is not clear: even in sleep mode rx1950 consumes some power. After ~8h in sleep ~20% of battery was eaten :( I suspect one cause of this problem can be sd/mmc card power management - it was not implemented for rx1950. So I implemented rx1950 s3c2410_mmc_def_setpower function that controls sd/mmc card power. When GPJ1 == 0 card is not powered, when GPJ0 == 1 card is powered. Some info about card-related gpios: GPJ1 - controls card power (1 == on) GPH8 - ro sense, (1 == rw, 0 == ro) GPF5 - card detection Latest patch is available here Precompiled kernel and sound modules are available here

Points 0 and 1 completed :)

Yep, I've just finished rewriting touchscreen and battery drivers to use s3c24xx_adc driver instead using adc directly. It was relatively easy :) No more adc_battery driver (s3c24xx_adc is not adc-class compliant, and I was too lazy to port adc-class to 2.6.28). I rewrote adc_battery to use s3c24xx_adc driver directly, and named it s3c_adc_battery :) And with touchscreen it was much easier: just add some #includes, add adc_client field to device struct, add 2 callback implementations, add some lines about registering as adc_client, and replace some lines that start adc conversion... That's all. Patch is available here P.S. It seems touchscreen driver needs some filtering... I'll look what openmoko guys made to implement touchscreen filtering.

rx1950 battery driver

Today I've finished first implementation of rx1950 battery driver. It's based on adc-battery driver from hh.org Charging now work correctly (I've tested it, it can charge my battery to 100%, and then disables charging and makes red LED to light solid) Battery level estimated only by battery voltage. It's quite inaqurate and I'm trying to find ways to improve it. Results of my efforts as usually available on hh.org: http://handhelds.org/moin/moin.cgi/HpIpaqRx1950 P.S. Unfortunately, battery driver conflicts with touchscreen driver. I'm working on solution...

Batteries, lithium, ions, chargers...

At last :) I've managed to get charging work correctly, red led blinks when charging is in progress, and lights solid when charging finished. (Denis reported that his PDA has yellow led, btw, it does not matter :)) Problem was stupid: GPJ2, GPJ3 and GPJ6 (and not GPJ4 as I've reported before!) are affected in battery charging. I'll post patch after some testing ;) Here's short description: when charger connected, GPF2 goes to 0, and EINT2 interrupt occurs. In that case we should: set GPA2 and GPA3 to 1 wait for some time, GPF3 should become 0 (not sure that it's necessary) then we need to set GPJ2, GPJ3 and GPJ6 to 1 when charging is finished, GPF3 becomes 1 (GPF2 still 0!), in that case we should: set GPA2 and GPA3 to 0, set GPA6 and GPA7 to 1 set GPJ2, GPJ3, GPJ6 to 0  when charger is disconnected, GPF2 = 1. Each charger connecting/disconnecting event EINT2 occurs. But it doesn't when charging finished - so we should poll GPF3 periodically to prevent battery o...