star: usb/gadget: support LG_ACM_FIX

2010/12/05 by jm1.lee@lge.com

matching for LG Android Net Driver from vs660.
LG host driver use 16 bytes as max packet size of notify ep,
but QCT use 10 bytes. Therefore we apply non-public patch for matching
with LG host driver.
star: setup acm/serial/gps for star.

and f_serial_gps.c added
    sed 's/gser_/gps_/g;s/_gser/_gps/g;s/"gser"/"gps"/' f_serial.c > f_serial_gps.c
star: make the ram_console not depend on the carveout size

Currently, the carveout size is fixed as 128M
and the ram_console is fixed and depend on the CarveoutSize.

this patch make the ram_console and the *temporary* reserved_buffer
not depend on the carveout size.

and the commit "[HACK] copy the warmboot information to the original
reserved_buffer area before shutdown" is needed to fix reboot issue.

Conflicts:

	arch/arm/mach-tegra/board-nvodm.c
	drivers/staging/android/ram_console.c
star: clean up reboot code

move star specific reboot code from arm_machine_restart() to tegra_machine_restart()

Conflicts:

	arch/arm/kernel/process.c
	arch/arm/mach-tegra/common.c
[HACK] copy the warmboot information to the original reserved_buffer area before shutdown

The reserved buffer area must be fixed at
512MB - 128MB - reserve area(1MB or 2MB) + 512kB(ram console)

just copy the warmboot information to the original reserved buffer before shutdown.

See also http://tinyurl.com/cg6wgtr by TrymHansen

Conflicts:

	arch/arm/mach-tegra/board-nvodm.c
	arch/arm/mach-tegra/common.c
star: cleanup cnt32_to_63_clear()

Since cnt32_to_63() is not used after commit "ARM: tegra: convert
sched_clock() to use new infrastructure" (manually applied)
cnt32_to_63_clear() also not needed anymore.

Conflicts:

	arch/arm/mach-tegra/power.h
	arch/arm/mach-tegra/suspend.c
	arch/arm/mach-tegra/timer.c
	include/linux/cnt32_to_63.h
su660: tspdrv: .llseek added

it is found that immvibed daemon call lseek() but it fail
just add a dummy .llseek solve this bug.
p99x: cleanup

 - remove duplicated linux/delay.h header
 - CONFIG_COMPAT_NET_DEV_OPS is removed kernel option
 - EXT_CSD_CARD_TYPE_DDR52 is replaced by new option
 - remove workaround of inet6_create()
star: fixup some minor bugs

 - fixed *_show(), *_store()
 - gyro_accel: remove unused variables
 - fixed "function declaration isn't a prototype" warnings
 - move pg_readl/pg_writel declaration
p99x: fix oops while shutdown

partially update tegra_battery_shutdown() from V20H to fix this issue.

...
[  868.588607] tegra_battery_shutdown
[  868.597091] Restarting system.
[  868.604015] star_emergency_restart : sys reset : timeout = 20 sec
[  868.617694] tegra_machine_restart
[  868.624627] Unable to handle kernel paging request at virtual address da98d008
[  868.638506] pgd = d8994000
[  868.645447] [da98d008] *pgd=1982c811, *pte=00000000, *ppte=00000000
[  868.659262] Internal error: Oops: 7 [#1] PREEMPT SMP
[  868.666130] Modules linked in:
[  868.673060] CPU: 1    Not tainted  (3.0.8-dev+ #2)
[  868.686605] PC is at NvOdmGpioGetState+0x28/0x48
[  868.693504] LR is at [b]star_read_charger_state_gpio[/b]+0x38/0xb0
[  868.706939] pc : [<c008b930>]    lr : [<c03e9350>]    psr: a0000113
[  868.706944] sp : d89edb88  ip : d89edba8  fp : d89edba4
[  868.727449] r10: 00000001  r9 : 00000000  r8 : c07c3980
[  868.734303] r7 : d920f25c  r6 : c074e080  r5 : d89edbcf  r4 : d89edba8
[  868.748080] r3 : 00000001  r2 : d89edba8  r1 : 80000092  r0 : da98d004
[  868.761700] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM Segment user
[  868.775425] Control: 10c53c7d  Table: 1899404a  DAC: 00000015
...
star: use star_capacity_from_voltage_via_calculate() in case of BatteryGauge_on == FALSE

 - add POWER_SUPPLY_PROP_VOLTAGE_{MIN,MAX}
 - show battery icon correctly in case of BatteryGauge_on == FALSE
su660: adjust star_capacity_from_voltage_via_calculate()

star_capacity_from_voltage_via_calculate() seems not good enough
especially for AcLineStatus == ON.
try to adjust voltage-capacity curve, cleanup and make it more readable

Conflicts:

	drivers/star/star_battery_charger.c
star: add CONFIG_STAR_BATTERY_UNIT_UV to support voltage unit in uV

CM7/CM9 based custom rom use voltage unit in uV
add CONFIG_STAR_BATTERY_UNIT_UV option to support it

Conflicts:

	drivers/star/Kconfig
	drivers/star/star_battery_charger.c
star: fixed various minor bugs

 - fix a missing return value in NvOdmServicesPmuGetHookValue
 - fix a wrong argument type for NvOdmPmuReadRtc
 - fix headset schedule work
 - fix error checking
 - fix sscanf in bd_address_store
star: fixed star_capacity_from_voltage_via_calculate() to adjust AC charging curve

the commit "su660: adjust star_capacity_from_voltage_via_calculate()" is
correct only for USB and battery charging/discharging curve.
adjusted AC charging curve added.
use console_lock/unlock()

acquire/release_console_sem() are renamed to console_lock/unlock()

commit ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff
Author: Torben Hohn <torbenh@gmx.de>
Date:   Tue Jan 25 15:07:35 2011 -0800

    console: rename acquire/release_console_sem() to console_lock/unlock()

Reported-By: vadonka <vadonka@vadonka.com>
consoleearlysuspend: use tty_lock/unlock correctly for kernel 3.0
Merge remote-tracking branch 'remotes/linux-stable/linux-3.0.y' into p99x-ics-3.0.y
Merge branch 'tegra-p99x-3.0.y' into p99x-ics-3.0.y