During a power_role swap, the CC lines get disconnected for a bit.
This causes the charger driver to prematurely declare a disconnection
and it resets back to disconnected state.
Update the code to distinguish a disconnect caused during PR_SWAP vs
a real disconnect.
Avoid
- resetting the CC line to HW control
- switching DRP mode
- enabling the crude sensor workaround
- enabling APSD
during a discconnet caused by PR_SWAP
Note that PR_SWAP setting/unsetting needs to done regardless of the
connected state of the CC line. When PR_SWAP is notified to be
completed and the CC lines are still seen disconnected call the real
disconnect code.
While at it Vconn can be disabled too in the real disconnect code path.
Change-Id: I97ab7ee343c5b2bcf25797e6acbb1de37f5ba00a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Introduce POWER_SUPPLY_PROP_PR_SWAP to notify if the device is in
power role swap.
Change-Id: I8d0cb3a71ec1a646b7ec37405e66cb00ddc40e0d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
The driver could leave SDP's current draw to a higher value
once its removed. This is because the code to reset the
current limit needs the type to be SDP to reset it which is
not going to be the case after removal.
So reset SDPs current limit back to 100mA in the code path
for non-SDP chargers.
Change-Id: Idfb9df1b72a17f1db63265b85f6546cbb77c4018
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
IPAv2 hardware works with 32 bit addressing,
so allocate a kernel memory using GFP_DMA flag
which is processed by IPA hardware. Added code
changes to free correct tx_pkt pointer in fail_dma_map condition.
Change-Id: I5f7005c3bf89275fd56af648ee5bf1b3d06afc38
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
Return an appropriate error code if the default pagetable is NULL.
Change-Id: Ic88b066c40a8f840d95fd3fbc9ee9274c428b66a
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Caller of tz_handler() is having the NULL check for devfreq,So
we don’t need unnecessary NULL pointer check.
CRs-Fixed: 2046922
Change-Id: I42eb70ab19b4a5af193521d77bca86447a1ecdb8
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Race is happening when both audio_pcm_close() and audio_send()
executes in parallel.
When the PCM session is closed, the substream attribute of the
audio_dev structure is set to NULL in audio_pcm_close().
As there is no synchronization protection for the audio_dev subtream
attributes in audio_send(), it is causing NULL pointer dereference.
Hence fixing the issue by adding proper synchronization protection
for the audio_dev subtream attributes in audio_send().
CRs-Fixed: 613498
Change-Id: Id9ab0d4e347b8bb2f551f9033829e541bdcaf0e8
Signed-off-by: ChandanaKishori Chiluveru <cchilu@codeaurora.org>
Signed-off-by: Tarun Gupta <tarung@codeaurora.org>