OMAP4: TWL6032: Stop USB charging if VBUS voltage below limit.

This patch adds ability to set VBUS limit (via sysfs node).
If VBUS below this limit, device stops charging from USB
(and start charging if device VBUS is above this limit).

New sysfs node has been added:
/sys/bus/platform/devices/twl6030_bci/vbus_charge_thres
This node holds VBUS limit value in mV.

Writing to this file cause setting vbus_charge_thres field in
twl6030_bci_device_info structure.

Main work is done by twl6030_usb_autogate_charger() function,
which reads GPADC channel 10 value (VBUS voltage), compare it
with limit value and tunrns on/off USB charger.
This function is called from twl6030_bci_battery_work()
function (also known as twl6030_bci_monitor_work workqueue).
There is also additional check in twl6030_start_usb_charger()
function, to prevent charging from low voltage USB source.

Change-Id: I5b9fb557cf60d69588f8d1234cffb606f185e207
Signed-off-by: Mykola Oleksiienko <x0174904@ti.com>
TI Thermal Governor: Updated the parameters for OMAP hot spot extrapolation

Due to a different OMAP die size between OMAP4460 and OMAP4470, the parameters
used to extrapolate the hot spot temperature from
the on-die sensor and the PCB sensor are different between 4460 and 4470.
When running thermal simulations, it appears that current parameters used on
OMAP4460 are not optimal.

This patch adds the capability to select the slope/const parameters according
to the OMAP44xx silicon revision and aligns these parameters with latest thermal
simulations (28th March 2012).

Change-Id: I828291504f6a23a1640c589af2d4913cf00f9745
Signed-off-by: Sebastien Sabatier <s-sabatier1@ti.com>
OMAP4: USB: Update EHCI TLL errata i640

The workaround for EHCI TLL i640 errata has a critical timing window between
clearing the FPR bit in the PORTSC register and cutting the TLL clock. The
register writes to clear the FPR bit and cut the TLL clock need to occur in
back to back instructions otherwise we could still experience a disconnect
as described in the original errata. The ehci_writel function will cause a
L2 cache flush and so when compile takes multiple instructions. Instead of
using ehci_writel use __raw_readl.

Change-Id: Iaacf6987e37a1096b9d1c59fb3e71eb0f1c7aac3
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
I2C: OMAP: NACK without STP

On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access.
The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP
OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message.

According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and
OMAP_I2C_STAT_AL are nearly the same.
Removing the OMAP_I2C_CON_STP part in the isr fix the problem.
Tested on OMAP4430 and OMAP3530 (here NACK was not a problem)
Fixes also booting on 2430sdp.

[Picked from http://patches.linaro.org/1899/]

Change-Id: I9bdeba8853ced27659770ad9390bd1b4be573155
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Audio not working yet, receive i2c timeout.
Merge remote-tracking branch 'remotes/omap_zoom/p-android-omap-3.0' into acclaim
Update bus number with correct value. Update config (delete Dummy audio device).
update config