Commit Graph

25472 Commits

Author SHA1 Message Date
Pavankumar Kondeti
aa449e1efb USB: OTG: msm: Fix ACA implementation
Synopsis 28nm PHY has two different circuits for detecting changes on
ID line.  ID_DIG is designed for detecting ID_float vs ID_gnd.  ID_ACA
is designed for detecting RID_A, RID_B, RID_C states.  These are mutually
exclusive and enabling both circuits has undefined behavior.  Enable
ID_ACA upon VBUS high or ID_gnd events to detect further ACA states.

ACA ID_GND threshold range is overlapped with OTG ID_FLOAT threshold range.
Hence PHY ID_DIG circuit can not be used for detecting ACA ID_GND.  Use
PMIC ID circuit for detecting both OTG and ACA ID_GND.

Link controller can not generate PHY_ALT interrupt in host mode. But the
corresponding PHY register reflects the actual ID state.  Hence implement
polling to read PHY register to detect ID_GND --> ID_A, ID_A --> ID_B
transitions.  That means low power mode can not be allowed in host mode.
Also disallow suspending the device attached on the root hub.  Otherwise
PHY is put into suspend state automatically upon setting SUSP bit in PORTSC
register.

Link controller can not generate asynchronous interrupt for ID_ACA changes
in low power mode.  Hence disallow low power mode in ID_B and ID_C states.

USB_MSM_ACA is not selected by default. If it selected, ACA states can be
detected and low power mode is not allowed in host mode.  Writing "enable"
to <debugfs>/msm_otg/aca enables ACA irrespective of USB_MSM_ACA selection.
This is meant for debugging only.

Change-Id: I51e80d803a583c5bdffc8111696943c04958f604
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2011-11-15 13:20:12 +05:30
Anirudh Ghayal
51e947f6f5 mfd: pm8xxx-misc: Add pm8xxx stay on API
The API configures the PMIC to ignore the PS_HOLD low
signal, which can be used during debugging.

Change-Id: I162657934e34da081eb897d64ffed36ad48e4eff
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-11-14 08:19:17 +05:30
Anirudh Ghayal
a4262a3821 mfd: pm8xxx-misc: Add pm8xxx hard reset config API
The API configures PMIC for different behaviour on hard reset.
The different options are to disable hard reset, shutdown or
restart on hard reset.

Change-Id: I214d563e904dd7e73c98a454866718a60a11b6dd
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-11-14 08:19:05 +05:30
Linux Build Service Account
27e8d53719 Merge changes I75853196,I9e677ebd,Id3802e37,Ic3fe2733 into msm-3.0
* changes:
  mfd: pm8xxx-misc: Add pm8xxx watchdog reset control API
  mfd: pm8xxx-misc: Add pm8xxx smpl based API's
  mfd: pm8xxx-misc: Add the pm8xxx coincell chg API
  mfd: pm8xxx-misc: Add a ISR to handle 32 kHz OSC halt
2011-11-13 13:30:25 -08:00
Linux Build Service Account
72a2b5ddf5 Merge "hwmon: pm8xxx-adc: Merge pm8921-adc and pm8xxx-adc" into msm-3.0 2011-11-11 21:45:05 -08:00
Anirudh Ghayal
a23c1cabcc mfd: pm8xxx-misc: Add pm8xxx watchdog reset control API
The API configures PMIC to either shutdown or reset
when the PS_HOLD line goes low.

Change-Id: I758531966c08ec5acafaeedea13b59019aafa8bc
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-11-12 06:14:34 +05:30
Anirudh Ghayal
bfbaf82d21 mfd: pm8xxx-misc: Add pm8xxx smpl based API's
Add APIs to:
1. Configure PMIC to reset/shutdown on a SMPL event
2. Set SMPL delay time

Change-Id: I9e677ebd5b4339b50e7d18e2ba0eb3af694c2d20
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-11-12 06:14:14 +05:30
Anirudh Ghayal
7b3822911a mfd: pm8xxx-misc: Add the pm8xxx coincell chg API
The API enables/disables the coincell charger. It also configures
the coincell charger's voltage and register settings.

The charger allows the coincell (connected to VCOIN) to charge
from VBAT.

Change-Id: Id3802e37d8100e6a72de9fd263e7d201a7a346d2
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-11-12 06:13:39 +05:30
Linux Build Service Account
ab12ea460a Merge changes Iccd3819c,If5856ead into msm-3.0
* changes:
  ASoC: msm8960: add headphone over current protection type
  ASoC: wcd9310: add headphone over current protection feature
2011-11-10 19:31:34 -08:00
Linux Build Service Account
94583edbd4 Merge "ALSA: add headphone over current switches" into msm-3.0 2011-11-10 16:32:29 -08:00
Alex Bird
27ca661bda msm: Add SMI callbacks to ION platform data.
As part of the transition from PMEM to ION, the interface for accessing
SMI memory needs to be accessible from ION as it was from PMEM.

Change-Id: Ia6f9475dc030bbb0dafdcc1b6dbe93c7cdeca268
Signed-off-by: Alex Bird <alexbird@codeaurora.org>
2011-11-10 10:43:24 -08:00
Linux Build Service Account
fd72eef7e2 Merge changes Id8440508,If012dcdb into msm-3.0
* changes:
  msm: rotator: ion support in rotator driver
  msm-fb: display: ion framework support
2011-11-10 01:11:51 -08:00
Linux Build Service Account
89d5d6c47c Merge "hwmon: msm_adc: Calibrate HK/XOADC" into msm-3.0 2011-11-10 01:11:51 -08:00
Siddartha Mohanadoss
ae39c90df6 hwmon: pm8xxx-adc: Merge pm8921-adc and pm8xxx-adc
Merge changes from pm8921-adc to pm8xxx-adc. The
changes are modification to the BTM lookup table
to map voltage vs temperature instead of A/D word
vs temperature and reverse calibration on the
input voltage read for BTM. Fix setting the
mpp_scale value to avoid compile error.

This keeps the pm8xxx-adc and pm8921-adc
functional code as the same except for the name
change allowing future patch to remove the
pm8921-adc driver.

Change-Id: I03a0b809cd232f7fe8dff86248651c9a2593be29
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2011-11-09 22:07:10 -08:00
Nagamalleswararao Ganji
e69bed86ff msm-fb: display: ion framework support
Add support for the ION memory manager
to the framebuffer driver

Change-Id: If012dcdbbc71eb0f7d4d429ad4789b3276d34a58
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2011-11-09 15:19:07 -08:00
Lucille Sylvester
596d4c2954 msm: kgsl: Count a percentage of _io time
Count different percentages based upon GPU frequency.

Change-Id: Ia579f6705ff9858263f507bd4f3ba0f84b772554
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-11-09 14:13:15 -07:00
Patrick Lai
49efeaccb1 ASoC: wcd9310: add headphone over current protection feature
wcd9310 CODEC supports notification of excessive current
drawn by headphone power amplifiers. When receiving notification
from CODEC through interrupt, this driver reports this event
through soc jack framework. At this point, power amplifiers will
be locked hence no audio can be heard. Locking would be removed
once user-space application deroutes playback out of headphone path.

Change-Id: If5856ead31c9a6b8d918c09f1fdc517a69d4fa26
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-11-09 10:19:16 -08:00
Vijayavardhan Vennapusa
fc464f0f66 usb: msm_otg: Vote for EXT_3P3V regulator for MHL connector
In case of 8960 Liquid, need to vote for EXT_3P3V regulator
to avoid usb connection lost as MHL analog switch is powered
by this regulator.

Change-Id: Ifc36d7916a5407801fdf43357176efa264d160bd
CRs-fixed: 315979
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2011-11-09 04:48:15 -07:00
Linux Build Service Account
363899275c Merge "msm: audio: qdsp6v2: Add 4GV wb/nb support in mvs driver" into msm-3.0 2011-11-08 18:03:38 -08:00
Vijayakumar Muthuvel Manickam
2d2a2c595a hwmon: msm_adc: Calibrate HK/XOADC
Calibration for HK/XOADC is done once at init by
msm_adc before the first ADC reading is processed.

Calibration performed for every ADC read is expensive
and not recommended. Remove support to request
calibration by ADC clients.

Add stubs for pmic8058 xoadc functions to fix
featurization

Change-Id: I7f0e165bddaa49c5daf33df5ed77428ccc1434c5
Signed-off-by: Vijayakumar Muthuvel Manickam <vmuthuve@codeaurora.org>
2011-11-08 15:52:36 -08:00
Patrick Lai
ac510b92be ALSA: add headphone over current switches
Some CODECs monitor current drawn by headphone power amplifer.
If current consumed goes over pre-defined threshold, CODEC would
communicate to host processor. Then, CODEC driver would propagate
the event so user-space application can react accordingly.
Add support to propagate over current events for both
left headphone and right headphone through ALSA jack framework.

Change-Id: Ieef36f070a4478a5a80ec4c8b0cc81464abd75ad
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2011-11-07 14:33:45 -08:00
Vinay Kalia
27020d1b5d video: msm: Writeback support in mdp for WFD.
Adds writeback mode in mdp for wifi-display(WFD).
This mode can be used to get the captured
frames from mdp. This is added to support
wifi-display capture device.

Change-Id: Iae30cac65af181d8df4b514a128cd876fe7dda1c
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
2011-11-05 17:33:26 -06:00
Vijayavardhan Vennapusa
2b592824f9 USB: EHCI: Configure HSIC host<->hub<->Conventional USB devices
SMSC hub must be configured so that Conventional USB
devices can be connected to SMSC hub on 8960 liquid.

Change-Id: I261798de153d3c37f2fa2c4d7e15d96bb81c432f
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2011-11-04 14:09:57 -06:00
Linux Build Service Account
e0d4643f8e Merge "dt: add empty of_get_property for non-dt" into msm-3.0 2011-11-04 11:04:37 -07:00
Linux Build Service Account
de09bc6240 Merge changes I3d56518b,I60f4e108 into msm-3.0
* changes:
  msm8960: defconfig: Enable CONFIG_MMC_CLKGATE
  mmc: core: Use delayed work in clock gating framework
2011-11-04 11:04:37 -07:00
Linux Build Service Account
c4658f2250 Merge changes Ic0dedbad,Ic0dedbad into msm-3.0
* changes:
  msm: kgsl: Add ION as an external memory source
  msm: kgsl: Fixup per-process memory statistics
2011-11-04 01:11:07 -07:00
Stephen Warren
76ee8d653f dt: add empty of_get_property for non-dt
The patch adds empty function of_get_property for non-dt build, so that
drivers migrating to dt can save some '#ifdef CONFIG_OF'.

This also fixes the current Tegra compile problem in linux-next.

Change-Id: I2b60b6b9172051e847a0b1e4cc38e80ffc147047
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2011-11-04 08:25:05 +05:30
Linux Build Service Account
30dbf3483f Merge "hwmon: pm8921-adc: Add reverse calibration for BTM" into msm-3.0 2011-11-03 15:35:08 -07:00
Santosh Mardi
2292028c22 ASoC: wcd9310: Update legacy mode, txfe controls based on platform data
Based on tabla platform data update the legacy mode, txfe bypass and
txfe buff mode on tx path.

CRs-Fixed: 308208
Change-Id: I96df7a213578ed8e975030dc8d4b983d03eb6518
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2011-11-03 13:28:59 -06:00
Linux Build Service Account
c478970dc7 Merge "power: pm8921-charger: use trickle time for trickle charging" into msm-3.0 2011-11-03 00:21:06 -07:00
Sujit Reddy Thumma
0d0bc29d8c mmc: core: Use delayed work in clock gating framework
Current clock gating framework disables the MCI clock as soon as the
request is completed and enables it when a request arrives. This aggressive
clock gating framework when enabled cause following issues:

When there are back-to-back requests from the Queue layer, we unnecessarily
end up disabling and enabling the clocks between these requests since 8MCLK
clock cycles is a very short duration compared to the time delay between
back to back requests reaching the MMC layer. This overhead can effect the
overall performance depending on how long the clock enable and disable
calls take which is platform dependent. For example on some platforms we
can have clock control not on the local processor, but on a different
subsystem and the time taken to perform the clock enable/disable can add
significant overhead.

Also if the host controller driver decides to disable the host clock too
when mmc_set_ios function is called with ios.clock=0, it adds additional
delay and it is highly possible that the next request had already arrived
and unnecessarily blocked in enabling the clocks. This is seen frequently
when the processor is executing at high speeds and in multi-core platforms
thus reduces the overall throughput compared to if clock gating is
disabled.

Fix this by delaying turning off the clocks by posting request on
delayed workqueue. Also cancel the unscheduled pending work, if any,
when there is access to card.

sysfs entries are provided to tune the delay as needed with default
value set to 200ms.

Change-Id: I60f4e1087c4f22bfe7817153c54a0c72ae22b6b6
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2011-11-03 11:27:49 +05:30
Jordan Crouse
8eab35ab5a msm: kgsl: Add ION as an external memory source
Allow ION buffers to be attached via IOCTL_KGSL_MAP_USER_MEM

Change-Id: Ic0dedbada34d12fb70b528f3a93dd21805a4c8a4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-11-02 18:29:03 -07:00
Anirudh Ghayal
f9929b1e29 input: cyttsp-i2c: Move regulators to LPM/HPM in suspend/resume
Change-Id: I341f33d2627dc9f3f7c511a69db8a84c4b886841
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-11-02 14:49:16 -06:00
Laura Abbott
63cfd7e6a2 8660: Add support for Ion
Add support for Ion

Change-Id: I1c04b8a6df005c6ced8681f419f4445592b4832d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-11-01 16:30:51 -07:00
Abhijeet Dharmapurikar
e45c3d38a6 power: pm8921-charger: use trickle time for trickle charging
Correct a typo where safety time is used for trickle charge time
in the code.

Add the valid ranges and power on defaults for safety timer and
trickle charge timer.

CRs-Fixed: 313652
Change-Id: I49a04c6445d197555b2a434bf4577b6e38e3d3e3
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2011-11-01 16:28:57 -06:00
Siddartha Mohanadoss
b377415f17 hwmon: pm8921-adc: Add reverse calibration for BTM
-Change BTM threshold table to map temperature vs
input voltage instead of temperature vs A/D word.
Apply reverse calibration to convert the input
voltage to A/D word.
-Fix representing low/high threshold voltage as
a signed int.

CRs-Fixed: 313653
Change-Id: Ib565c672130f8a246a05636c1353ef0d5b373b7d
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2011-11-01 11:17:45 -07:00
Laura Abbott
6557696b65 gpu: ion: Add header file for ERR_PTR
Add err.h for the declaration of ERR_PTR which
is used with the stubbed out ion headers.

Change-Id: Ic5e5aea556723ea6b9c8953ef54ad5a82d3761ec
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-31 22:40:09 -07:00
Linux Build Service Account
ebd2931e42 Merge "USB: Add nop functions for !USB case" into msm-3.0 2011-10-31 05:54:03 -07:00
Anirudh Ghayal
5213eb8787 mfd: pm8xxx-misc: Add uart gpio mux control API
CRs-Fixed: 313982
Change-Id: I10ea5283271619f0ae510ad7039e0df8b1745f57
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-31 11:19:34 +05:30
Pavankumar Kondeti
15f2553568 USB: Add nop functions for !USB case
OTG drivers that use USB core functions like usb_add_hcd, usb_remove_hcd,
etc can be selected for gadget only mode without selecting CONFIG_USB.

Change-Id: Ie4b0c1703622cc9051ad9f50b8901f0005daeeb6
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2011-10-31 09:02:45 +05:30
Laura Abbott
2d1760b4f1 board-msm8960: Add ion heaps corresponding to pmem heaps
Add adsp heaps for ion. This corresponds directly
to what pmem currently does. This also includes disabling
the adsp and pmem heaps for pmem.

Change-Id: I4354c713413ebbe949579741efdd75e9c444c8e7
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-30 06:02:16 -06:00
Jordan Crouse
8cd4832d4d gpu: ion: Add inline stubs for Ion functions
Add inline stubs for in-kernel Ion functions to use when
Ion is not enabled in the kernel config.

Change-Id: Ic0dedbadbe4d7bab8f24763e67dd775c769b06df
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-28 15:27:14 -06:00
Laura Abbott
273dd8e94a gpu: ion: Add API to get the buffer flags
Clients may want to know what the existing flags are on a
handle for mapping, cache flushing or other purposes. Add
an API to get those flags.

Change-Id: I2d8c93194d1fc940042529b8851ebecf35d6e3de
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-28 13:18:34 -07:00
Linux Build Service Account
8cce8536a1 Merge changes I4ac6f9ef,I96bc377c,Ia5fdfb02,I601d24ef into msm-3.0
* changes:
  mmc: core: use non-reentrant workqueue for clock gating
  mmc: core: prevent aggressive clock gating racing with ios updates
  mmc: rename mmc_host_clk_{ungate|gate} to mmc_host_clk_{hold|release}
  Revert "mmc: fix a race between card-detect rescan and clock-gate work instances"
2011-10-28 11:59:46 -07:00
Linux Build Service Account
b89e7c3714 Merge "cne: Add reference count for Smart Wireless Interface Manager" into msm-3.0 2011-10-27 18:42:13 -07:00
Linux Build Service Account
cf5a9faf69 Merge "power: pm8921-charger: enable external charger" into msm-3.0 2011-10-27 14:35:52 -07:00
Chinh Tran
bbebbfed74 cne: Add reference count for Smart Wireless Interface Manager
Add the reference count for Smart Wireless Interface Manager to
know whether there are any process who still has the socket in
question in use or not.
Enable INET DIAG.
Redefine the TCP_FLAG as it gives compiling error when an enum is defined
by a function return.

Change-Id: I1aa9c810fec2e332048c9ef4199ec3f996bc3a75
Signed-off-by: Chinh Tran <chinht@codeaurora.org>
2011-10-27 09:23:11 -07:00
Linux Build Service Account
d5ad0085fe Merge "msmfb: display: support for overlay wait ioctl" into msm-3.0 2011-10-26 19:23:21 -07:00
Jay Chokshi
868312e934 leds: pm8xxx: Add PWM feature in leds-pm8xxx
Pass PWM period and other configuration from board file.
Update the LPG LUT based on the duty cycles,
pause count, and period.

Change-Id: Ie1812ae8010d986a943af6f3883b13c25bc7244c
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2011-10-26 12:23:49 -07:00
Amir Samuelov
d31ef501b8 power: pm8921-charger: enable external charger
The pmic 8921 charger has a limit of 2Amp of charge current. This limit
makes it inadequate to charge multi-cell batteries.

The pm8921 charger supports a configuration where an external charger
with more current capacity may be used to charge the battery while the
pm8921 itself can charge from a USB source. In such a configuration
the external charger source is connected to the DCIN pins, this makes the
pmic detect insertion and removal of the external charger source. In turn
this enables automatic switching on or off the usb charging path when an
external charger is plugged out or in respectively. The pm8921 charger
driver has to call start and stop on external charger. The internal
FSM and logic correctly indicates that it is charging from a DC source.

The resume charging of a fully charged battery when an external source
is present needs to start charging from an external source. The driver
relies on VBATDET comparator to signal a low.

Change-Id: Iab5439ac2408ab061bce477f4d41d7b6a8de9b38
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2011-10-26 14:41:36 +02:00