usb: smd: Fix RTS bit clear on disconnection

RTS bit on smd control channel is cleared upon
disconnection and is not raised afterwards which
can cause DSM pool exhaustion on modem side.
This fix prevents RTS bit clearing on disconnection.

Change-Id: I1eb5fed5d8b1afd23a6b2bb36a59a4399858581f
CRs-Fixed: 441354
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
usb: audio: Fixed alternate interface request

To pass USBCV chapter 9 tests, alt interface request
must return the last alt interface number set by host.
get_alt function now returns the correct alternate
interface number.

Change-Id: I0d0f7a0c9a9c616dd31395372e7c2bc736e5135d
CRs-Fixed: 436836
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
usb: audio: Fixed double scheduling of playback_work issue

If audio function recevied set_alt requests at a specified
order an issue would happen when the same playback buffer
would be scheduled for playback twice and that would lead
to a crash. This fix prevents this issue by insuring no
buffer is scheduled more than once.

Change-Id: If2a0a7262e6861c084173b9aa956abe840fe3e20
CRs-Fixed: 436836
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
msm: acpuclock-8974: Update (decrease) L2 voltages for 8974v2

Hardware characterization has shown L2 voltages can be safely
lowered for power savings. Update the data accordingly.

Change-Id: Ic52ab01e2426a32e2208994dfa86f3de40c3f89e
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
ASoC: Avoid putting stream state to STOP when stream paused

When multiple Front-end are using the same Back-end, putting
the stream state for a Front-end to STOP will make the the Backend
stream to be released, when the front-end is paused. This will avoid
the Backend to be released (when another active front-end stream is
present).
Instead, put the stream state to PAUSED, which will keep the Back-end
ON.

Change-Id: Ic31bf90a09b605b91f6b9fe3c09361b1145581fb
CRs-fixed: 428825
Signed-off-by: Banajit Goswami <bgoswa@codeaurora.org>
msm: mdss: fix incorrect mixer configuration on boot

When continuous splash screen is configured, logic for mixer allocation
depending on mdp revision doesn't work because mdp revision is not
properly read until after mixer allocation. At the same time when
configuring the correct mixer, need to make sure that any previous mixer
configuration is properly reset so that only desired mixers are set
correctly in control path.

CRs-Fixed: 462585
Change-Id: I5d5d270e9f2f0c38c990743ae55cd98b2e77bbb0
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
cfg80211: Extend support for IEEE 802.11r Fast BSS Transition

Add NL80211_CMD_UPDATE_FT_IES to support update of FT IEs to the
WLAN driver and NL80211_CMD_FT_EVENT to send FT events from the
WLAN driver. This will carry the target AP's MAC address along
cfg80211: Extend support for IEEE 802.11r Fast BSS Transition

Add NL80211_CMD_UPDATE_FT_IES to support update of FT IEs to the
WLAN driver and NL80211_CMD_FT_EVENT to send FT events from the
WLAN driver. This will carry the target AP's MAC address along
with the relevant Information Elements. This event is used to
report received FT IEs (MDIE, FTIE, RSN IE, TIE, RICIE). These
changes allow FT to be supported with drivers that use an internal
SME instead of user space option (like FT implementation in
wpa_supplicant with mac80211-based drivers).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 355199e02b831fd4f652c34d6c7673d973da1369
Git-repo: http://git.kernel.org/cgit/linux/kernel/git/linville/
wireless-testing.git/
Change-Id: I03e750494a2735a393f1ec57f3d66e3575265c8a
CRs-fixed: 434525
[deepthi@codeaurora.org: backport to 3.4-This commit includes the
changes from following commits to compile for msm-3.4.
5314526b1743e8e8614293db7d86e480b4fe9824 : cfg80211: add channel
switch notify event
98104fdeda63d57631c9f89e90a7b83b58fcee40 : cfg80211: add P2P
Device abstraction
f4e583c8935c6f52f9385ee7cfbea8f65c66a737 : nl/cfg80211: add the
NL80211_CMD_SET_MCAST_RATE command
ed44a951c72ab409f932b1c15914488308e86da2 : cfg80211/nl80211: Notify
connection request failure in AP mode
77765eaf5cfb6b8dd98ec8b54b411d74ff6095f1 : cfg80211/nl80211: add
API for MAC address ACLs.
04f39047af2a6df64b763ea5a271db24879d0391 : nl80211/cfg80211: add
radar detection command/event.
3713b4e364effef4b170c97d54528b1cdb16aa6b : nl80211: allow splitting
wiphy information in dumps.
ee2aca343c9aa64d277a75a5df043299dc84cfd9 : cfg80211: add ability
to override VHT capabilities.
355199e02b831fd4f652c34d6c7673d973da1369 : cfg80211: Extend
support for IEEE 802.11r Fast BSS Transition.]
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
usb: dwc3: msm: use of_platform API to create dwc3 core pdev

Currently platform_device_alloc() and platform_device_add() APIs
are being used to create dwc3 core pdev. Due to this, not able
to pass platform data from device tree to core pdev. Hence use
of_platform_populate() to create dwc3 core platform_device  from
device tree data.

Change-Id: Id731d759de65c8ae0f766b46bdeeec07afb6ad4b
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
msm_serial_hs_lite: Remove usage of PM Runtime for startup and shutdown

If UART application is running and system suspend happens, serial core
suspends the UART port by shuting down UART port. With that
msm_hsl_shutdown is calling pm_runtime_put_sync() from system suspend
context where before calling system suspend routine of UART driver,
it is already incremented UART device's PM refcount. Hence with that
pm_runtime_put_sync() from msm_hsl_shutdown() doesn't call UART driver's
PM runtime suspend routine. Hence UART device's Clock remains in ON state
which doesn't allow XO shutdown.

Serial core uses its own PM ops to enable/disable clock before invoking
any UART driver functionality. Hence remove usage of PM Runtime APIs
from startup() and shutdown() APIs of UART driver which makes sure that
suspend/resume is supported when UART application has opened the port
and not used any other way of preventing system suspend.

CRs-Fixed: 467750
Change-Id: Ie2b6e7eaeed518950674815c48a9ac3fe173d9e1
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
arm/dt: msm8226: Stop sharing the GPU DTS file with 8974

It was becoming unwieldy to try to share GPU settings between 8974
and 8226 while accounting for differences like the different number
of power levels for each core.  Make 8226 into a standalone DTS file.

Change-Id: Ic0dedbadb46fd7704a8e6b347d66c6b3a04035d3
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: vidc: Update compilation flag for video driver

Both 8226 and 8610 shared same arch flag. Now they are seperated so
adding 8226 flag for compilating of video driver on 8226 target.

Change-Id: I619eb9594c0d853d1f68a05e0012f61e881c42d3
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
msm: vidc: Fallback to physical address in absence of IOMMU

Add necessary check to confirm absence of IOMMU and fallback
to physical memory address when IOMMU is absent.

Change-Id: I6957ce93392f67161f48371d5fc5ac74773886d8
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
msm: vidc: Register new nodes to support q6 hfi

Add support for different node values for simultaneous
venus and q6 usecase. This is needed to support HEVC
decode on msm8974, where venus and q6 both will be
present. Also create "link_name" device attribute
to provide a meaningful name to the video device
instead of video32, video33 etc. Userspace reads
this "link_name" sysfs node and creates appropiate
dev node symbolic link.

Change-Id: Iab14cad2c43b78eb7553ac78521611727597a42f
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
msm: kgsl: Allocate space in ringbuffer for EOF commands

When userspace passes end of frame (EOF) flag, ringbuffer is
inserted with EOF marker commands. Allocate ringbuffer space
for EOF marker commands.

Change-Id: I7de8d1b81d358a8d8753ac84fbdceddad27bb17d
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Add a type field to the adreno draw context flags

Allow the user space to pass in a type field to indicate the
type of upper level library that owns the context. The type
field is added to all the appropriate ftrace output for easier
debugging.

CRs-fixed: 462903
Change-Id: Ic0dedbadd42fc5ccfffd89738affd4794a6ab85e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Properly record the size of the sglist in the memdesc

It was possible to fail out of kgsl_sharedmem_alloc after a sglist was
allocated but before we saved the size of the allocation which caused
problems when the sglist was freed during cleanup.

Change-Id: Ic0dedbadd57ec4d9422b5e3a873243d0ffed51f7
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
power: pm8xxx-ccadc: implement quick calibration

There are certain systems that wakeup every so often to do some
housekeeping work. We don't want to run a full calibration
when the system wakeups.

For such systems runs a quick calibration with just two samples.
Use the periodic_wakeup flag to indicate such a system.

CRs-Fixed: 454221
Change-Id: Ifc86414f7fab4d0921e3289d6e52b9e077a1f625
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
msm: kgsl: fix paren placement leading to fence timeout

The incorrect paren placement can lead to a fence timeout
because the last_timestamp is always written. As a result
the last_timestamp could be corrupted by writing an old
value leading to a future timestamp_cmp indicating that a
signaled sync pt was unsignaled.

Change-Id: I4650a467bfdd98a905f86fbec7d833596c67ba19
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
msm: camera: Add separate mutex for different ioctls

Real time ioctls such as buffer operations and registers
configuration updates are timing critical. Other ioctls
such as ISP stream start/stop could take longer time to
finish because the ioctl blocks until the hardware
start/stop streaming completely. Using a separate mutex
will prevent real time operations from starving and
results in framedrop.

Change-Id: I3421b596bde53198ba4df7da9636441762c739db
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
USB: dwc3: Add support for ZLP handling for control endpoint

If the control data length is multiple of endpoint zero maximum
packet size, DWC3 gadger driver is not sending zero length packet
to inform Host of end of data transfer. Due to this, USB enumeration
will fail. Hence add support for handling ZLP in case of control
data length that is mulitple endpoint maximum packet size.

CRs-Fixed: 465540
Change-Id: I139e4798be46c5a3e1e6a6d10fa3cd425301a1eb
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>