s3c6410_battery.c

Kernel development related

s3c6410_battery.c

Postby MadRocker » Thu Mar 17, 2011 1:38 pm

It seems the "vital" kernel from samsung has a decent s3c6410_battery.c s3c6410_battery.h that we might be able to use. It builds without problems.

I am testing the m920_android_defconfig with a few small changes to both .config and Kconfig + Makefile 's in vital kernel.

Please not this files is not perfect but much closer to working than what I could find so far.

Thijs / KB / Dopi,
If JetModules is driving you guys bananas then look at both m900 and vital m920 kernels and their method + build.sh that integrates with android + builds (init + tscal + modules and kernel). This might end up being a easier option for the kernel and easier to get working with android platform build for future platform building.

Everything is there just need to update drivers and a few small changes and GCC links to complete.
You do not have the required permissions to view the files attached to this post.
MadRocker
Dev Team
Dev Team
 
Posts: 528
Joined: Sun Dec 12, 2010 7:15 am

Advertisement

       

Re: s3c6410_battery.c

Postby MadRocker » Thu Mar 17, 2011 1:52 pm

Not sure if this one would work but worth a try.
You do not have the required permissions to view the files attached to this post.
MadRocker
Dev Team
Dev Team
 
Posts: 528
Joined: Sun Dec 12, 2010 7:15 am

Re: s3c6410_battery.c

Postby Jose_Paramore » Thu Mar 17, 2011 3:27 pm

MadRocker wrote:Not sure if this one would work but worth a try.

This is for battery level detection or for battery gauge?
It doesn't works for me... battery level keeps showing 80% and I have no battery gauge.
Cheers,
Jose
Come on JétDroid team!!! ;D
User avatar
Jose_Paramore
Forum Moderator
Forum Moderator
 
Posts: 312
Joined: Thu Oct 21, 2010 3:44 pm
Location: Spain

Re: s3c6410_battery.c

Postby alfonzobonzo » Thu Mar 17, 2011 4:32 pm

Do we not need an updated kernel image to remove the fake battery driver??
Do Androids Dream of Electric Sheep?
User avatar
alfonzobonzo
Dev Team
Dev Team
 
Posts: 143
Joined: Thu Oct 21, 2010 7:00 pm
Location: UK

Re: s3c6410_battery.c

Postby Jose_Paramore » Thu Mar 17, 2011 4:56 pm

alfonzobonzo wrote:Do we not need an updated kernel image to remove the fake battery driver??

I think so!
Maybe this is my problem :roll:
Come on JétDroid team!!! ;D
User avatar
Jose_Paramore
Forum Moderator
Forum Moderator
 
Posts: 312
Joined: Thu Oct 21, 2010 3:44 pm
Location: Spain

Re: s3c6410_battery.c

Postby MadRocker » Thu Mar 17, 2011 5:36 pm

Yes sry you will need to remove the fake battery and then test otherwise the fake will block this.

The module *.ko might also work but also would need to a zImage where the fake battery is disabled.
MadRocker
Dev Team
Dev Team
 
Posts: 528
Joined: Sun Dec 12, 2010 7:15 am

Re: s3c6410_battery.c

Postby Jose_Paramore » Thu Mar 17, 2011 6:08 pm

Which files do I need to use? The first one or the second one? Where do I have to place them? How to remove fake battery?
:?
Come on JétDroid team!!! ;D
User avatar
Jose_Paramore
Forum Moderator
Forum Moderator
 
Posts: 312
Joined: Thu Oct 21, 2010 3:44 pm
Location: Spain

Re: s3c6410_battery.c

Postby MadRocker » Thu Mar 17, 2011 6:48 pm

There might be more changes that needs to be made to the kernel like gpio ect ect to get this working.

1. Use the 2 files and replace the 2 files in
~/JetDroid/kernel/drivers/power

2. In terminal:
Code: Select all
cd ~/JetDroid/kernel
make ARCH=arm jet_android_defconfig
make menuconfig


3. Go down to drivers and select, then to "power supply class support" and select s3c battery, un-select s3c fake battery.
Exit exit exit = save = yes

4. Then build the kernel.

I will upload a zImage in a bit with this inbuilt, just going to runs a few test. zImage will only be good for testing the battery not for much else. We can later build a good kernel if this works.

Edit> if this files is too unstable 02Droid has updated the battery and mmc.
MadRocker
Dev Team
Dev Team
 
Posts: 528
Joined: Sun Dec 12, 2010 7:15 am

Re: s3c6410_battery.c

Postby Mericon » Thu Mar 17, 2011 10:53 pm

got:

Code: Select all
<4>[    7.189885] s3c6410_battery: Unknown symbol s3c_adc_get_adc_data
<4>[    7.204689] s3c6410_battery: Unknown symbol Get_MAX8698_PM_REG
<4>[    7.219470] s3c6410_battery: Unknown symbol Set_MAX8698_PM_REG
<4>[    7.234351] s3c6410_battery: Unknown symbol amp_enable
<4>[    7.242815] s3c6410_battery: Unknown symbol audio_power
<4>[    7.253473] s3c6410_battery: Unknown symbol sys_open
<4>[    7.262526] s3c6410_battery: Unknown symbol get_usb_power_state


in kernel.log

it shows still 80%
But it boot up :)
Mericon
Dev Team
Dev Team
 
Posts: 83
Joined: Thu Oct 21, 2010 4:08 pm
Location: Aachen

Re: s3c6410_battery.c

Postby MadRocker » Mon Mar 21, 2011 10:15 am

Wow I have been stupid all along.

Has anyone tested the s3c6410_battery_vital.c or s3c6410_battery_vinsq.c as it should work for the m910 and should already be fixed but we ended up using a older broken s3c6410_battery.c that is ignored during vital and instin builds.

Note the file size difference 90kb & 86.3kb from M910 kernel source, could be the same for M920 as well.

This might be the same for other drivers instead of default, use hardware specific and modify the 1% change to S8000 and we might have more working drivers much faster.
MadRocker
Dev Team
Dev Team
 
Posts: 528
Joined: Sun Dec 12, 2010 7:15 am

Next

Return to JetKernel

Who is online

Users browsing this forum: No registered users and 1 guest

  • Advertisement
cron