[Touch HD Android Development] camro:
hi,

here a kernel, which we want to commit to kernel "msm-linux"

(the kernel should be for: raphael, diamond, blackstone, topaz, rhodium, kovsky) booting via haret

all credits to crazyvirus, alex, acl, jonpry, phh, oliwe, etc ...

BE CAREFUL ! best would be -> make backup before, beucase there a lotof changes and i tested only the blackstone !

changes overview:

1.) new battery algo for better display the VOLUME (for now blackstone is ajusted, the other devices battery devices could be, that we must do finetuning

2.) new USB driver (working also if not connected on boot)

3.) AC / USB charger detection

4.) reboot/shutdown should now work for devices (maybe it reboots - not only shutdown, must do testing on it for diff devices)

TESTING:

please test this kernel:

1.) battery - specially we need testing on battery -> please add the logging data from kernel... -> via kernel logging -> cat /proc/kmsg | grep battlog)

2.) USB

.) connecting USB after rebooting, then try to connect via win adb or linux

.) test mass data storage

.) DON'T click/test wlan hotspot !!! it could be, that you have problems after using it !

3.) AC / USB charger -> change the adapter and look on battery information if it will be changed correct.

4.) reboot/shutdown should now work for devices (maybe it reboots - not only shutdown, must do testing on it for diff devices)

please help on testing, because we want soon to commit this changes.

cu camel

PLS: as you know, this kernel is for multiple sys please add always:

Device: ??

Battery Type: Original or ????

Battery Volume: ???? mAh

############################

attached a new kernel V8

.) try now to fix the boot for kovsky (device think the batt is 70° hot ...)

.) cleanups for battery driver things

.) logging is now different

.) there is a new log option (only in startup.txt boot option like:)

+ htc_battery_smem.debug=7 ( 0 | 1 | 2 | 4 ) via bit (so 7=all)

+ htc_battery_smem.fake=1 ( 0 | 1 ) via bit (0 = OFF / 1=ON) (would fake to system, that it is always on USB charger)

+ htc_battery_smem.vol_min=5 ( integer value which will be the minimum value) if it is < then it will correct the volume to this value, so the battery can also run out (if wanted)

here an example of my startup boot option line:

set cmdline "gsensor_axis=-2,-1,3 lcd.density=240 msm_blackstone_pad.vibrate=1 msmvkeyb_toggle=off acpuclock.oc_freq_khz=575000 msmsdcc_fmax=32000000 htc_battery_smem.debug=7 rel_path=AndroidBoot"

EDIT9: kernel v9

.) fixing high temperature on kovsky & rhod (which does on startup autoamtically a shutdown, because android system is thinking the batt is too hot.

:> i made a mistake, which should be now correct. if it would be too hot (> 50°), then i set the temp to 499 = 49,9° -> so watch out if there is a value of 499 on temp

EDIT10: kernel_v10

.) now battery data for blackstone should be fine. (current + volatage, + % + 93% to 100%

.) kovsky adjustment for voltage, temp + current should be now better ...

EDIT11: kernel_v11

.) now battery data for raph should be fine. (current + volatage, + % + 93% to 100%)

EDIT12: kernel_v12

some device had problems with wrong values from battery driver, and then device shutdown by itself ..

-> should be fixed now

EDIT13: kernel_13

sorry, the kernel v12 was very bad, a lot of mistakes ..sorry

.) fixed a lot of things in alog, specially if charging, had wrong values, also fix temperature values, etc...

.) adjusted raph100 (hwboard_id=1)

fixed some errors on wrong values which shutdown the whole system

EDIT14: kernel v14

.) fixed some problems with charger devices

.) added corr for AC adapter if current is higher

.) adjust a lot of things on algo

EDIT15: kernel v15

.) made a stupid bug in autocorrection function (temp was never corrected), so the device shutdown the device if wrong values ..is fixed now :)

EDIT16: kernel v16

.) add addionally debug prints for kovsky (because no battery init)

.) diamond100-900 adjustments - for diamond100-900 we need a FINAL LONG TEST - see posting #2

EDIT17: kernel v17

.) added support for topa??-1100 vendor=2

.) removed extra debugging prints for kovsky

EDIT18: kernel v18

.) added support for kovsky, new rhod type

.) extreme values checking

.) adjustments for rhod + kovsky current, temp, etc..

.) extra recheck for INCALL

.) rhod: set POWER to HOME KEY (only for rhod)

EDIT19: kernel v19

.) try to write the temperature only once, if value is ok, so the auto shutdown shouldn't happen any more.)

.) adjustment for kovsky device

.) some other small fixes

EDIT 20: kernel v20 (battery driver on chip 2746 - experimental)

.) there is a new log option (only in startup.txt) boot option like

+ htc_battery_smem.debug=7 ( 0 | 1 | 2 | 4 ) via bit (so 7=all)

+ htc_battery_smem.fake=0 ( 0 | 1 )

+ htc_battery_smem.vol_min=0 ( integer value which will be the minimum value) if it is < then it will correct the volume to this value, so the battery can also run out (if wanted)

+ htc_battery_smem.vol_max=100 ( integer value which will be the maximum value) if it is > then it will correct the volume to this value, so the battery won'T be charged by kernel, and the battery can switch off the charging by itself

.) adjustment on current + voltage for kovsky

.) alex patches: clock wince + kovsky battery support via ds2746 (no idea how it works - short test before a long time test makes sense and would be welcome

EDIT21: kernel v21

.) support for rhod300

.) changed back to calc the kovsky from kernel on normal way

.) removed the wince clock path from Alex (because users reported problems with flickering)