Add PMIC revid support to identify the PMIC subtype for OLEDB driver.
This is useful to enable the functionalities/features that are specific to
certain PMICs like PM660A.
Change-Id: I4539955abb29fe37256e21ac507db646953e0abf
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Channel 511 is used for debug port on MSM8998/SDM660/SDM630
targets. Reserve the same to avoid the access from other
peripherals.
Change-Id: I928916b7d61793a07e9a3b2e1c2127a247c71730
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
8021Q enables kernel to handle VLAN packets, which is necessary
for the VLAN feature of alx.
Change-Id: I57c4bf7a40c5ad06b3c7414ae51691f006841ab9
Signed-off-by: Luo Jie <luoj@codeaurora.org>
When the charger mitigation is configured based on SW,
enable it locally when the total brightness (or current
level) of all torch/flash LED devices is greater than 1 A.
CRs-Fixed: 2011199
Change-Id: I8336b3201f0780855c3dc3633179c398b9f62162
Signed-off-by: Ankit Sharma <ansharma@codeaurora.org>
Do not keep the channel reserved for debug port in the
ppid to apid mapping table. This is to avoid accessing
that particular channel during the read/write/irq operations.
Change-Id: I8f49d1d87978a5b68ea711d3e30606d72fd09f73
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
The GPLL0 source to the CPU subsystem requires 300MHz for OSM to use the
clock source. OSM internally cannot set the RCGR divider, so set the RCG to
300MHz at GCC.
Change-Id: I7a781c69656410eb4ce30126789dbaacf815e8ec
Signed-off-by: Taniya Das <tdas@codeaurora.org>
intialization of pd_stats buffer index during open node,
and after stats buf_divert.
Change-Id: I499371ddb4eddd74b759720d553164006c223f8a
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
The commit '6b4f77 (mm: vmscan: invoke slab shrinkers from shrink_zone())'
fixed the invocation of shrinkers but resulted in lowmemorykiller shrinker
being called more. Reduce the number of lowmemorykiller shrinker
invocations by separating out the lowmemorykiller shrinker from
shrink_slab. This will make lowmemorykiller invoked only once for all zones
reclaimed in the direct reclaim path, and once for each zone in the kswap
path. As a consequence the eligible pages passed to shrink_slab_lmk is now
the reclaimable pages of all zones. Reducing the number of lowmemorykiller
invocations reduces the unnecessary time spent in lowmemorykiller and thus
contention or failures on lowmemorykiller's scan_mutex.
Change-Id: Iaabb9e441711f1dc804980b5853b64b3f214698d
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
FCC and Float voltage is configured by battery driver using
power_supply framework (main_psy), re-run FCC/FV election once
main_psy is available to ensure FCC/Float voltage is configured
and reflected on hardware.
While at it, add check for valid "pl_psy" before using it.
CRs-fixed: 2028082
Change-Id: I2f5dc174eacf325ba27186b07c89bb7d438f061b
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
A livelock can be created in the system by lowmemorykiller trying to kill
the same task again and again. Below is the livelock condition.
P0 -> binder_main_lock(W)
P1 -> binder_main_lock(T)-> mmap_sem(W)
P2 -> mmap_sem(T) -> lowmem_scan::scan_mutex(W)
P3 -> lowmem_scan::scan_mutex(T) -> send SIGKILL P0
Here multiple tasks are contending on scan_mutex, and binder_main_lock.
Change lowmem_scan mutex_lock with mutex_trylock, so in case of lowmem_scan
lock contention, task will be allowed to reclaim from other shrinkers. This
will also maintain the serialization of lowmemorykiller trigger.
If a task is pending MEMDIE'ing, remove sleep before falling back on other
shrinkers.
If the task selected to be killed is MEMDIE'ing and in un-interruptible
sleep state, do not repeat kill but fallback on other shrinkers without any
delay.
Change-Id: I12131622f7fa7b422c6d5d09f782af848300e412
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
The register BATTERY_CHARGER_STATUS continues to show charging state
(like FULLON or TAPER mode) in cases where charging was paused due
to input OV. Look at BATTERY_CHARGER_STATUS_7_REG to determine if
charging was paused.
This fix modifies previous similar change for JEITA hard condition but
continue to cover the case.
Change-Id: Ibc5f4f5e85651708b656f06814008b0c319db02d
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Currently a legacy cable is always assumed which causes decreased
performance from non-legacy HVDCP adapters with 10k ohm Rp.
Fix this by disabling and re-enabling Type-C to rerun the legacy cable
detection.
Moreover, the legacy cable IRQs are not used and cause unnecessary
type-c-change IRQs to fire. Disable them.
CRs-Fixed: 2020132
Change-Id: I57fc3762251ead028298f01b06d66f52fd119c6b
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Currently the USB Type-C status is retrieved from the hardware in real
time. The Type-C change IRQ should trigger on every change of the Type-C
status, therefore it is not necessary to read the status registers
multiple times if a Type-C change IRQ has not triggered. Furthermore,
workarounds which force UFP/DFP mode, or disable Type-C altogether could
mislead the software into thinking a removal has happened.
Cache all of the USB Type-C status registers upon receiving a USB Type-C
change IRQ, and use the cached status where appropriate.
CRs-Fixed: 2020132
Change-Id: I99f2ff29633207898ae803672162db0c3cec80dc
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
During USB removal a lot of cleanup happens; votables are reset, flags
are cleared, etc. After the cleanup is finished there is a chance that
USB power supply consumers may set properties before getting the USB
removal notification. This can lead to many problems where ICL limits
are set based on the previous insertion, or APSD is disabled due to a
late setting of PD_ACTIVE.
Introduce a lock which prevents USB power supply consumers from setting
properties when USB has been removed. This lock will ensure that the
next insertion starts with a clean slate.
CRs-Fixed: 2020132
Change-Id: I05a4145289b6097e41afc30aa09782722fa03fb6
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Currently it is expected upon USB removal that consumers will receive a
notification that USB has been removed and will cleanup after
themselves. Unfortunately this makes it very difficult to keep track of
all of the necessary cleanup steps upon removal.
Also, in preparation of not allowing consumers to set properties after a
USB removal has happened it is now the responsibility of the charger
driver to cleanup on their behalf.
Moreover, since we don't have a separate removal/insertion interrupt,
the removal/insertion code may run even if the typeC cable is not
physically inserted/removed. Fix it by tracking a typec_present flag.
CRs-Fixed: 2020132
Change-Id: Ia514abaa4e12f72daec17fd1e95f3c51cc38a15f
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Currently the CC2 removal workaround starts whenever PD issues a hard
reset. When PD issues a hard reset it is not guaranteed that VBUS will
fall since the source may not even be PD capable.
The CC2 removal workaround should only run during the time that VBUS is
low and CC is debounced.
Fix this by scheduling the CC2 removal workaround when VBUS falls and CC
is debounced, and cancel the workaround when either VBUS rises, or the
removal detection is successful.
CRs-Fixed: 2020132
Change-Id: I6475d37911d90805ed8b3bb4b3a26a9f7557ebd6
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
AFE sidetone is currently enabled based on a combination
of mixer control setting and default config in ACDB.
This change will limit enablement to mixer control setting alone.
Change-Id: I038d51177adc3e1da45ea7fdf9386362390f181d
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
Refactor the fs readpage/write tracepoints to move the
inode->path lookup outside the tracepoint code, and pass a pointer
to the path into the tracepoint code instead. This is necessary
because the tracepoint code runs non-preemptible. Thanks to
Trilok Soni for catching this in 4.4.
Change-Id: I7486c5947918d155a30c61d6b9cd5027cf8fbe15
Git-commit: d854b68890
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Mohan Srinivasan <srmohan@google.com>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Adds tracepoints in ext4/f2fs/mpage to track readpages/buffered
write()s. This allows us to track files that are being read/written
to PIDs.
Change-Id: I26bd36f933108927d6903da04d8cb42fd9c3ef3d
Signed-off-by: Mohan Srinivasan <srmohan@google.com>
Git-commit: 32cbbe5953
Git-repo: https://android.googlesource.com/kernel/common/
[runminw@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
After cdm has been used, need to reset cdm block,
or the next HDMI device will be affected by the
cdm config.
Change-Id: I4eb879202cc3547d9149b3352377c3395ebfe6b3
Signed-off-by: zhaoyuan <yzhao@codeaurora.org>
Queue the msg receive task in service notifier queue
so that it does not run concurrently with other notifier task.
This avoid an issue where adsp ssr is stuck due to deadlock
between msg receive and service arrive task.
Change-Id: I6ef9b765ae74eeb32021c2848ffc06d70df19c1b
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Make opened device count atomic variable to avoid probable race
condition. Race condition leads to memory leak and list corruption.
Change-Id: I4da98f27d36f616bc8fa7b1a848c20cc7eea04e5
Signed-off-by: Divya Ojha <dojha@codeaurora.org>
There are some cases where MDSS GSDC is not turned off after FB
PM suspend ever after clock ref count is 0 as runtime suspend
is not triggered. Ensure that MDSS GDCC is toggled in these
cases.
Change-Id: I33389ad736960b619b32a9bec4b2b157eed4d20b
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
WARN_ON is unnecessary if pre-alloc table doesn't have any free
memory. Remove the WARN_ON as error log is enough to find out
missing entry.
Change-Id: I5a46e1f259e88d1a19f05195f5d7bb0745d072c3
CRs-fixed: 2030272
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
GPIO21 is connected to SMB1381 STAT pin for interrupt detection,
configure it to pull up for sensing SMB1381's interrupt.
CRs-Fixed: 2033882
Change-Id: Ib88aac4acb3b1094adb13839cccf1aa27903b9c7
Signed-off-by: Yingwei Zhao <cyizhao@codeaurora.org>
In case of very slow insertion of SDP/DCP there is a possibility
that D+/D- makes contact while APSD is in progress. This will
result in an incorrect type detection.
Fix this by doing a APSD rerun after charger-type detection is
complete.
CRs-Fixed: 2032590
Change-Id: I0037b90f29dbe65a2cdb2771d5caceff77862f03
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Since on some platforms DSI_CMD_OFFSET register has become
double buffered, so dynamic fps update and DSI DMA command
transfer can not happen at the same time. This changes makes
panel status check which in turn does a DSI DMA transfer, and
dfps update mutually exclusive.
Change-Id: If8591c55d31669dbf3f565db041c04bcd6cb616a
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
When the need for CPUs is more than the active CPUs and there are some
isolated CPUs, we wakeup the core_ctl thread to unisolate some CPUs.
The core_ctl task can't unisolate any CPU if all of them are isolated
by other clients. Track the number of isolated CPUs by core_ctl and
wakeup the core_ctl task when adjustment is really possible.
Change-Id: I11ef10860532df25cbde572aabd4b925320db8fe
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The cluster->active_cpus is not updated in eval_need(). The new need
for CPUs is compared against the previous cluster->active_cpus. If
another client isolates a CPU, cluster->active_cpus becomes stale and
we fail to detect the change in need for CPUs.
Change-Id: Ib58b8f0bd03dd2b4a174de2ac54eb0c60c59f9f7
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
We are interested in only CPU_ONLINE and CPU_DEAD notifications. Don't
do anything when other notifications arrive.
Change-Id: Iea2e0e1c93e67ef278ee7c5a9813fbab6cea5c74
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Enable register read based ESD check mechanism for nt35597
truly command mode panel used on sdm660 platform, as per HW
recommendation.
Change-Id: I11f897a24d29f215901c2d95d1c5070716ca6515
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
In the current implementation DSI driver is masking the
fake ACK and overflow errors that might occur during if
BTA mechanism is used to check ESD. But if register read
mechanism is used to check ESD, then also embedded BTA will
be triggered and fake ACK and overflow errors might be
reported. Mask the same for register based ESD check also.
Change-Id: If1ee0a7cc0171b96a3b7298aa5201372c6eb8139
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>