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>
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>
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>
* 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
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>
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>
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>
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>
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>
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>
Count different percentages based upon GPU frequency.
Change-Id: Ia579f6705ff9858263f507bd4f3ba0f84b772554
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Allow ION buffers to be attached via IOCTL_KGSL_MAP_USER_MEM
Change-Id: Ic0dedbada34d12fb70b528f3a93dd21805a4c8a4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
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>
-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>
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>
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>
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>
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>
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>
* 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"
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>
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>
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>