Some special EEPROM needs VAF to be active while accessing.
Add VAF handles to EEPROM nodes.
CRs-Fixed: 1021009
Change-Id: Ic01e031b70ac7d0c0705b486ad86a5cbca9fd923
Signed-off-by: Viswanadha Raju Thotakura <viswanad@codeaurora.org>
Currently some hardware default charge settings are modified with
software default charge settings. Remove the software default settings,
and use only the device tree properties for changing the hardware
defaults.
Change-Id: I02a0cbbf547aacc5e813d027a2f3623cc01e1dd6
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Currently the charge cycle continues while the battery is OV. Configure
the charger to end the charge cycle while battery is OV.
Change-Id: I6fc333e15c5f0410c6b560b2a7005a1752f5f936
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
When a Type-C legacy cable is connected to the phone but left unconnected
on the other side an interrupt storm can be observed which is caused by
the vbus-error interrupt trigger. Disable this interrupt trigger.
Change-Id: I5342c58acc83ecff4bf5f8e425de94daa1dabb50
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
when mono headset is connected, either of the HPHL
or HPHR channel is enabled. So don't check for
both if cable is mono headset, otherwise RX chain is left muted
and hence audio is not heard from headset.
CRs-Fixed: 1018104
Change-Id: I464c785eba28f02993042d220e5744025e2f9346
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
This reverts commit 96913bef9307 ("drivers: mfd: Return EPROBE_DEFER during
codec failure"). If target can support multiple codecs,
one of the codec enumerates. When other codec fails to enumerate,
donot return -EPROBE_DEFER otherwise probe is triggered again
which is cleaning common resources and hence enumerated
codec is going to bad state.
CRs-Fixed: 1048317
Change-Id: I2f87777684c53408b7f73596f54c46b171469b76
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Add support for flash nodes for front and rear
camera.
CRs-Fixed: 1021009
Change-Id: I52537562214d439e9652bb6ba90f0d29e5b24fda
Signed-off-by: Viswanadha Raju Thotakura <viswanad@codeaurora.org>
Channel ids are not updated correctly in hardware params
fixup resulting in audio mute on one of the channels on headphones.
Fix the channel ids properly in msmcobalt machine driver hardware
params fixup.
CRs-Fixed: 1034829
Change-Id: If23da9ac1d2f71ad4d39371b665311f1f84b016a
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
The resp_len and resp_buf_ptr of qseecom_send_modfd_listener_resp
are not checked, then an userspace application that manipulates
resp_len can corrupt the kernel memory. Thus make changes to
validate these parameters.
CRs-fixed: 1036418
Change-Id: Id43ec6b55b332d0dac09a9abb998a410f49b44f7
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Upon usb disconnect or composition switch notify ep request buffer
as well as the request are freed. This is racing with user space
ioctl on character device trying to send the notification to USB
host. As a result notify ep request buffer is being dereferenced
causing NULL pointer dereference. Fix the issue by checking
is_connected flag by taking port lock before accessing notify
ep request and request buffer.
Change-Id: I380efdf90305a65d4cde46dfe44762ac11c87678
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
It is required to update VBUS status to USB controller using qscratch
registers HS_PHY_CTRL and SS_PHY_CTRL interfacing high-speed and
super-speed PHYs. This change perfoms same from USB controller's glue
driver on starting and stopping peripheral mode based on supported
USB speed with USB gadget.
It also updates devicetree documentation explicitly mentioning required
register sets.
CRs-Fixed: 1046503
Change-Id: I92df87c0e2ff54dd7ee513d277cc075eab561019
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change removes updating VBUS status from QUSB PHY driver using
QSCRATCH register. New change would be adding same functionality from
USB controller driver.
- It also updates devicetree documentation and existing supported
MSM platforms' USB device node property to accommodate above changes.
CRs-Fixed: 1046503
Change-Id: I4573a077bb455ebe3750ab76a91d2593d7e94ea5
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Add support to send switch event to framework when the HDP
status changes. This switch event is shared between HDMI and
DP.
Change-Id: I13161bd8b2a7777abbe2521178c5b1b1b6416eea
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Add device tree properties to enable detection of VPH droop,
short circuit and open circuit faults for flash LED on pmicobalt.
CRs-Fixed: 1024187
Change-Id: I13cf07b36f7bb890a71bedb9998a937e2c60ecb0
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Add support to receive and process the led_fault_irq to
detect short_circuit and open_circuit faults. Also, add
support to read all led_status registers in the irq handler.
CRs-Fixed: 1024187
Change-Id: I6941660484ea8b27377c668d1e7d815d52e83d83
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Add support for configuring the following features available
in flash LED:
1. VPH droop detection
2. Short circuit fault detection
3. Open circuit fault detection
CRs-Fixed: 1024187
Change-Id: I982e51ba62f0a75d1dcd3ef30e5d1249c970ffde
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Add the flash_prepare API to the leds-qpnp-flash driver to
maintain consistent usage of the API by the camera flash driver
across targets.
CRs-Fixed: 1043718
Change-Id: I21cc4b4556b2a4a1a918bfeb1d55ae164d4b5568
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Update the flash prepare API to accept a led_trigger device as an
argument. Also split the leds-qpnp-flash-v2 header file to keep the
flash_prepare API in a common header file for both legacy and v2
flash drivers.
CRs-Fixed: 1043718
Change-Id: Idb4ab086740b680e101d76d882bcfb618ac4b936
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
For display-port, use the existing EDID parser
that is used by HDMI.
Change-Id: I64c7fe03126d33eb0436c67eba9147dec1169e4d
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Add MDSS Display-Port device node for msmcobalt which is needed to drive
any external display that supports DP interface. Add the
msmcobalt-CDP/MTP specific GPIO entries needed for display-port.
Change-Id: I61592c167345ebec4cde07f0a72ef059f186b84a
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Adaptive variable refresh(AVR) allows timing modification of a current
frame by extending the vertical front porch values. This helps
shifting the vsync to slowest vsync interval supported by panel when
GPU rendering ready event is delayed. Define an interface for AVR to
enable client to control AVR settings. Validate client input for AVR
and configure the corresponding AVR registers.
CRs-Fixed: 1043819
Change-Id: I28f786bf0bdea4ecaa17270974ba6d7ffe469828
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
Ascent and Itech batteries might be used with msmcobalt MTP. Add
the battery profiles to support that.
Change-Id: Icfed6881763df35a7f948f171856903de7e07a2a
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Batterydata for itech 3000mah and ascent 3450mah batteries are
newly created to be used with GEN3 FG on pmicobalt. Add them.
Change-Id: I0fe51b607d44920784cc0bb8bfd442e81f3c5d3d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Add support for WiPower by instantiating DC power supply and the required
properties.
CRs-Fixed: 1044422
Change-Id: I81d2e3b67bf55460f40406328c5ad8c40851033a
Signed-off-by: Harry Yang <harryy@codeaurora.org>
DAPM marks front end dai as dirty during ASoC suspend
which triggers device path teardown. Add ignore suspend
to all front end dais to avoid device path teardown.
CRs-Fixed: 1031932
Change-Id: I1d85578534c58c121ca8e560d67faf9b94e87be9
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
SMEM_SMEM_SLOW_CLOCK_SYNC is currently unused as its usecase has
been deprecated for a long time. Reallocate the ID to
SMEM_WLAN_CONFIG.
CRs-Fixed: 1000088
Change-Id: Ib49db26ce93a682f282c393278b51da7b6bf00a4
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Property bit is checked in userspace and must be set in
driver in order to be recognized correctly since it defaults
to mouse pointer.
Change-Id: Ibdc78547e6376e6db54db75b1423718d13afaaa7
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Configure the transfer unit settings to control the
symbol stuffing.
Change-Id: I80d6c1ae6d7096e170105e5d297a563b3bee053d
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Add locking mechanism for host init. Remove mainlink_reset
before configuring the link rates.
Depending on the USB plug orientation, configure the
lane mapping register to support display-port over
usb-type-c port.
Change-Id: I7bf3fc6e102df113611b9450c92ecd4e50b26fb4
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
This change is needed to support display port
over USB type-C port. Add usbpd changes to
enable display port using Alternate mode for
type-C port.
Add support to parse VDO messages and send dp_config
packets when HPD is high.
Change-Id: I3ea5d969a73e3418af23ba4d8b7374fb20d2889f
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Use the DPCD info to configure pixel and link rates
supported by the sink.
Change-Id: Idd7ba4b564b013eda7596a111b9b934f6b6ff84f
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Add proper register base and register address offsets
when configuring the voltage swings and preemphsis
settings. Fix interrupt register bit for VIDEO_READY.
Change-Id: I6e89f6fbb3660d13c186b38eb7ca1f71cbe8109d
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
The DP driver will need GPIOs to configure the
AUX channel and orientation of USB type-C port. Add
support for the GPIOs.
Change-Id: I9940ff3cbcca7dd0ac972cabbfddcbd9ac4657fa
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Add support for clock initialization during driver probe.
Add support to configure clock rates before enabling the
clocks.
Fix the regulators disable sequence for display-port.
We can only read hardware revision register only after
configuring the PHY. Move revision read to host_init()
function.
Change-Id: I0e9f6caf84a8cdd825002938dad18482e2489cbd
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Clean up the focaltech driver by fixing the following checkpatch
errors.
1. else is not generally useful after a break or return
2. Possible unnecessary 'out of memory' message
3. Using __devexit is unnecessary
4. Unnecessary space before function pointer arguments
This patch is a propagated patch from 3.18 kernel
'commit 2b6ea311a968 ("input: ft5x06_ts: fix checkpatch errors")'
Change-Id: I36ed0497c12b0f14e9d7b60c2d8e78729871b8d0
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
Add reset controller framework for all MSM supported targets as it will be
used by clock driver and clients to use the framework.
Change-Id: I67804db996f47046242cbec2a85ed66d229a8156
Signed-off-by: Taniya Das <tdas@codeaurora.org>
The driver extended capabilities may differ for different
interface types which the userspace needs to know (for
example the fine timing measurement initiator and responder
bits might differ for a station and AP). Add a new nl80211
attribute to provide extended capabilities per interface type
to userspace.
Signed-off-by: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com>
Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 019ae3a918811715192b22c400ac78d54acc26a9
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
CRs-fixed: 1030694
Change-Id: I816b21d8433aea9407a14a8c8a5098701ee53b8c
[pkushwah@codeaurora.org: backport to 4.4-This commit includes the
changes from following commits in include/uapi/linux/nl80211.h to compile
for msm-4.4.
38de03d2a28925b489c11546804e2f5418cc17a4 :
nl80211: add feature for BSS selection support.
17b942478643c5a90c06d978479bd326040bfa19 :
cfg80211: allow userspace to specify client P2P PS support.
9b95fe59b18bcc891a6c60ae11d725c9c679574b :
nl80211: add missing kerneldoc for new *_PAD attributes.
2dad624e6dd65c6048a9bbe0e16559fce182c87c :
wireless: use nla_put_u64_64bit().]
Signed-off-by: Purushottam Kushwaha <pkushwah@codeaurora.org>
In an issue very similar to 4e461c777e (xt_qtaguid: Fix panic
caused by synack processing), we were seeing panics on occasion
in testing.
In this case, it was the same issue, but caused by a different
call path, as the sk being returned from qtaguid_find_sk() was
not a full socket. Resulting in the sk->sk_socket deref to fail.
This patch adds an extra check to ensure the sk being retuned
is a full socket, and if not it returns NULL.
Change-Id: Icee0df589ea8d61a999e8c7ea3afdcf4a40b412b
CRs-Fixed: 1035969
Reported-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Git-commit: cc0063b8eb
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Bryse Flowers <bflowers@codeaurora.org>
In upstream commit ca6fb06518
(tcp: attach SYNACK messages to request sockets instead of
listener)
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ca6fb0651883
The building of synack messages was changed, which made it so
the skb->sk points to a casted request_sock. This is problematic,
as there is no sk_socket in a request_sock. So when the qtaguid_mt
function tries to access the sk->sk_socket, it accesses uninitialized
memory.
After looking at how other netfilter implementations handle this,
I realized there was a skb_to_full_sk() helper added, which the
xt_qtaguid code isn't yet using.
This patch adds its use, and resovles panics seen when accessing
uninitialzed memory when processing synack packets.
Change-Id: Id0dbb7853aba221c1926e44616524fed90677602
CRs-Fixed: 1035969
Reported-by: YongQin Liu <yongquin.liu@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Git-commit: 4e461c777e
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Bryse Flowers <bflowers@codeaurora.org>