Currently, fan53555 regulator driver always registers for
set_suspend_voltage. This force configures the regulator to
set suspend voltage switching to a different voltage selector.
However, this might not be preferred for certain applications.
Add a device tree parameter "fcs,disable-suspend" for the
regulator which when specified will disable suspend voltage
configuration.
CRs-Fixed: 968575
Change-Id: Ib9f450126482e606f3e057857b7a58800583519a
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Halo HL7509 is a digitally programmable buck converter that
outputs a voltage from 600 to 1230 mV from an input voltage of
2.5 to 5.5 V. Since the register mappings are compatible with
FAN53555, add a new vendor ID to support it.
CRs-Fixed: 968575
Change-Id: I0083a7ada311d624731e43755cfd371b2364fb39
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently, fan53555_parse_dt() does a platform data allocation in
addition to reading device tree parameters. Move the memory
allocation out of fan53555_parse_dt() and change it only to parse
device tree parameters to match its name. This helps to expand
the function to read other device tree parameters.
CRs-Fixed: 968575
Change-Id: Id876d54bede15c73a298a6bfa68af7097115e36b
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently, rslow compensation active settings are applied and
cleared based on certain conditions. However, if the device goes
for a reset, the flag used by FG driver to save the setting done
will vanish. For e.g. if an active setting is applied and the
device goes for a reset, even if there is a condition present to
clear the active setting, it will not be applied. This is due to
the fact that the flag (rslow_comp.active) is not set in first
place even though FG HW has that setting applied. Fix this by
reading rslow configuration during hw_init and set the flag.
CRs-Fixed: 977626
Change-Id: Ib6d9f7d79335b027f7ed7ee24dfd5c9bb303228d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Update the fast-charge configuration for SMB1358 used to
index into the battery charge-current.
CRs-Fixed: 978046
Change-Id: I31ffc03d083c955ac1fdcf79ba5287a0107d3524
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Add ability to configure the polarity of enable-pin in
parallel-charger configuration.
CRs-Fixed: 978046
Change-Id: Ied82dff7afeaa58ea0815f555791c9a0d15e926a
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
If insert HVDCP charger when device in sleep, kernel wakes up by the
interrupt and after DCP being detected, there is a chance that kernel
going to sleep again and hvdcp_det_work won't be run. This causes the
HVDCP detection failure and stay at 5V to be acting as normal DCP.
Hold a wake lock before schedule the hvdcp_det_work, and release the
wakelock after it being detected.
CRs-Fixed: 966430
Change-Id: I7ca503a5656ab9031d409079421a24710f2996e6
Signed-off-by: Chunmei Cai <ccai@codeaurora.org>
Currently, ESR is being under-estimated when the battery state of
charge (SOC) is less than 2%. Add a change which can do tuning to
use default ESR values when SOC is less than 2% and switch back
to ESR extraction when SOC goes above 2%. When the SOC is greater
than 2% and less than 5%, apply slow settings for ESR pulse. When
the SOC crosses 5%, apply the default settings.
This will allow the SOC to increase more accurately when the FG
starts with a better ESR value. This feature is supported via
device tree property "qcom,esr-pulse-tuning-en".
CRs-Fixed: 953448
Change-Id: I37da8d2a9d795dc3d4daffeaf80a72d188243bfd
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently, a battery profile is loaded when the profile integrity
bit is not present, a new battery is inserted, or battery voltage
is not in range across reboot. When the battery profile loading
happens after the device has booted up, the charger driver is
notified to disable battery charging.
However, in cases like offline mode charging, the device can boot
up again with charging enabled causing battery parameters to be
modified even before the charger driver can probe. This causes
a jump in state of charge (SOC) across reboot and causes the FG
to restart. To help with this scenario, make sure the charger
driver is ready, and charging is kept disabled before the battery
profile loading process start. Enable charging back when there is
no need to reload the battery profile, or the FG has restarted
and the first SOC estimate is done.
CRs-Fixed: 953448
Change-Id: I90b1c81ce502c0f6e96feab3b23cff61054422cb
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
When the charger driver haven't been probed yet and batt_psy is
unavailable, batt_profile_init is rescheduled as it depends on
the charger to disable charging while loading profile. However,
this adds a constraint that SRAM parameters needs to be updated
every time just before batt_profile_init is called again. Else,
stale SRAM parameters will be used to decide whether the battery
profile can be loaded or not.
Hence, cancel and schedule the update_sram_data work whenever
battery profile loading is rescheduled again.
CRs-Fixed: 953448
Change-Id: I6e1108601baf744014227155b7b09e0ec4a0a9bb
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
The battery missing detection (BMD) is incorrectly
being enabled. Fix it.
CRs-Fixed: 943881
Change-Id: I58407f0b6ca376bc4809073144429cd4cc3483c9
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
This devicetree documentation snapshot is taken as of msm-3.18
commit 96a424f00642 (regulator: cpr4: Fix highest voltage corner
open-loop voltage calculation).
Change-Id: I7d65e33e9e501a9175730df676490189effbfd44
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This devicetree bindings documentation snapshot is taken as of
msm-3.18 commit 96a424f00642 (regulator: cpr4: Fix highest
voltage corner open-loop voltage calculation).
Change-Id: I9b62013a8049c3a22a62b34cd06b87245bcdc5de
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This devicetree documentation snapshot is taken as of msm-3.18
commit 85b7eb8ac225 ( Merge "ASoC: soc-core: Fix integer
overflow").
Change-Id: I06a15d2668de59db8fca3cae0b69f5d0d3351e05
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This devicetree bindings documentation snapshot is taken as of
msm-3.18 commit 85b7eb8ac225be (Merge "ASoC: soc-core: Fix
integer overflow").
Change-Id: I50640b74ffe7b3aa29f9f6ca29a012c25c52d157
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Since the following drivers are not present under drivers/power,
remove the DT bindings documentation for them.
Change-Id: I41c08c186b649e21ac376a21632df1414904b1c0
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This reverts commit f8aac738feb06363f4db715754f1e91d39ace021 ("net: unix:
Fix uninitialized warnings when building for ARCH=um").
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
This change fixes two corner case handling for the framedrop pattern
a) return the buffer when it is required in the drop frame handling
b) correct an incorrect framedrop pattern update when we miss the reg
update
Change-Id: I6d9b7715d3f0545a673d70e7744141f92bbc3a9d
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Decrement the burst count for dual stream in case of dual vfe. The
count is tracked in both streams and hence should be reduced for
both streams once buffer is done from both vfe.
Change-Id: I681390c2b3a2a0c4861721204ac19302335bf542
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
The ITS HAL3 test failed due to broken frames and green frames. The
root cause of the issue is due to the framedrop pattern setting in the
isp driver. This change fixes the following issues:
a) Keep tracking the hw framedrop pattern even after the reg update ack
miss.
b) Remove a race condition between the framedrop pattern setting and
request frame ioctl handling.
c) Correctly set the framedrop pattern after the request frame.
Change-Id: I862046c718d6e3a28d5f372eb2eb5e371471eb58
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
For 14nm CSIPHY, the 5th lane is the clock lane
in combo mode. So update the mask value to 0x10.
Change-Id: I628031b19c1bd99d6c117e8b8db05af95f540106
Signed-off-by: Xu Han <hanxu@codeaurora.org>
Changing csiphy clock lane setting and removing a
register write in combo mode to enable ov2685 on
msm8937.
Change-Id: I8e6d987a8072a0c2679f7b53bfd3522b8dfa5297
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
Ping pong mismatch occurs when the interrupts miss happens.
Handle this scenario properly by sending error to userspace.
Change-Id: Idd8f9979a9b0e8c6a1989dd89ed6b98ccaa54ac9
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
AXI should be halted whenever all HW streams are stopping. This will
improve KPI even for RDI streams. Currently halt is determined using
Disable_Camif which is only valid for PIX streams. Decouple the two to
improve KPI on RDI and avoid wait.
Also, cleanup after timeout in start_axi. Remove handling of SD_SHUTDOWN
to avoid multiple release.
Change-Id: I09db8adb766d2e7889443f779a716aaa2f6c09d1
Signed-off-by: Harsh Shah <harshs@codeaurora.org>
Add changes to update camera drivers to:
1. Update necessary Kconfig files to support camera driver
compilation.
2. Support minor changes to V4L framework.
3. Export uapi headers to header_install export location.
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
3phase clock is required in CPHY mode but not in DPHY mode.
Decouple 3phase clocks from other CSIPHY clocks in order to
not enable 3phase clock when camera is in DPHY mode.
Change-Id: I10f9a175ef937dab30afd9604cca3e870451b0c2
Signed-off-by: Xu Han <hanxu@codeaurora.org>
Remove the shared list of buffer queue that is used in case of
dual vfe. Whenever a buffer is dequeued from the buffer queue
program it on both vfe and ensure that buffer is dequeued only
once by compositing the buf done irq.
Also, program scratch buffer for stats stream
Change-Id: I96cd0a97b24bf6bc0223cbee8d1fc6bf2ecc7c49
Signed-off-by: Harsh Shah <harshs@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
The camera generic buffer manager and isp buffer
manager keep references of vb2 buffers locally during
buffer circulation. If for some reason the vb2 buffers
are freed from a cleanup call from mediaserver. The memory
for the buffers is freed. But the camera buffer managers
still access them for a fraction of time before the cleanup
call is triggered from daemon process. Hence make sure
to access the vb2 buffers only after checking for
the existence in vb2 queues to avoid memory corruption.
Change-Id: I7a1e5f9a3af3345e0c37d3208facbab107a6b9ed
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
When CPU do spin lock irq save, it will disable irq/preemption.
If the same CPU do spin lock (without disabling irq),
then irq context can preempt and acuire the lock hold by user,
which will possibly hang CPU.
Avoid the issue to use spin lock irq save consistantly.
Change-Id: I52e17d189668166ae126dc5948fe51bd79ae9859
Signed-off-by: Peter Liu <pingchie@codeaurora.org>
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Due to the tasklet scheduling, SOF and Epoch irq handling can be out of
order. This causes some false isp error message being reported. This change
removes the false error message due to the out of order irq handling.
This change will remove this unnecessary check.
Change-Id: I7dd7d36692f63a53e54e7afcee4d9ed32cb22bc6
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Do not memset the buffer queue since its already reset during free.
This also removes the requirement to reinitialize the buffer queue
lock
Change-Id: Ifccbd3fbffb822f47898cff5bfcae0e53ef7f275
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Update bit mask per VFE for put_buf instead of only count. In flush buf
update put buf mask first and put buffer if put_mask is same as get_mask
Change-Id: I8b128094e4ae62e5676a46e6a4624e4933234266
Signed-off-by: Harsh Shah <harshs@codeaurora.org>
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Add changes to track buffer being added to list. Add error
messages if buffer is found to be added twice. Add state checking
in the isp driver.
Change-Id: I1504e8984db3578009b8944719bbd559ad57d63d
Signed-off-by: Harsh Shah <harshs@codeaurora.org>
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Add snapshot for Video driver source for MSM targets. The code is
migrated from msm-3.18 kernel at the below commit level -
d5809484bb1bf5864dad2f081b0145224762963a.
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
This module provides support to userspace entity for hotplugging
and setting cpufreq policy min/max limits. It can also detect
cpu/io workload and notify userspace via sysfs nodes.
A userspace entity can specify a CPU mask and the number of CPUs
it wants online within that mask and this module will try to make
a best effort to keep those many CPUs online. Userspace can also
specify the min and max limits on CPUs instead of writing to the
scaling_min/max nodes from sysfs so that if any CPU is offline
this module maintains a vote for it which is applied
once the CPU comes back online.
A userspace entity can also set threshold value in sysfs nodes of
this module for cpu/io workload detection and this module can notify
userspace entity when that crietia is met via sysfs nodes.
Change-Id: Ib8185b684e92e28b766f20954df0f63cdbeec1e4
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
Detect Perf cluster peak loads near FMAX based on the trigger
thresholds set. On meeting the peak load criteria, the userspace
is notified to take action by applying parameters to enhance performance.
CRs-Fixed: 969499
Change-Id: Ie9687bf1aa832434dc61d20056f91a096d7be4f0
Signed-off-by: Vijay Ganti <viganti@codeaurora.org>
Replace obsolute cpu_up/cpu_down api with device_online/
device_offline api for cpu hotplugging
Change-Id: I808c733b0109ee6cf6183be229592d67f760d5cc
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
If any error happens during allocating memory or initializing cluster
structure then it returns error but it does not free already
allocated memory. This may cause memory leak in certain scenerios.
This change prevents memory leak by freeing memory when error
happens during initialization.
Change-Id: I820acd676dc5baff270c2093ca24a1014c25dabb
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
cpufreq governor tunables could be updated
only when cpu is online. Userspace might need
to apply and restore these tunables depending
on the power/perf need.
Provide sysfs node for userspace to poll over
and which gets notified on CPU_ONLINE and CPU_DEAD
events for any cpu. This mechanism could be
utilized to know when cpus come online
and then restoring or applying cpufreq governor
tunables. CPU_DEAD notification is also provided
for completeness.
Change-Id: I221a97c49a72da217e5e4b46a16a26042ef5c83f
Signed-off-by: Omprakash Dhyade <odhyade@codeaurora.org>
Add support for enter/exit cycle sysfs nodes for io detection
There are some usecases which may benefit from different enter/exit
cycle load criteria for IO load. This change adds support for
that.
Change-Id: Iff135ed11b92becc374ace4578e0efc212d2b731
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
Add support for multi_enter_cycles/multi_exit_cycles per cluster
There are some usecases which may benefit from different enter/exit
cycle load criteria for multimode cpu load. This change adds support for
that.
Change-Id: I3408405307ca03b9bba3f03e216ef59b98f29832
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
Certain governors may stop sending out notifications once CPUs enter
idle at min frequency.If governor's notifications stop then single mode
will not exit for long time. It can happen only if the exit conditions are
set in such a way that the time taken to exit single mode exceeds the time
for the governor to ramp down, idle out and hence stop sending
notifications leaving the system in single mode indefinitely.
This change adds separate enter/exit cycle sysfs nodes along with a per
cluster non-deferrable timer for single mode exit. The timer is armed only
when the load starts falling below the exit load threshold and is
cancelled when either the load starts going up or SINGLE mode is exited
due to exceeding exit cycle count. On expiry the timer resets SINGLE mode
and the enter/exit cycle counts.
Change-Id: I13552b2f4085c435b917833a2993f8c64ff4ed2f
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
If msm_performance module and some other module with the
core hotplug capability (like core_ctl) co-exist and
both of them try to hotplug the cores system inconsistencies
can occur. To avoid such behavior sysfs nodes needed for hotplug
support in msm_performance module are compiled out.
Change-Id: I25e8404ce0581e718d6b55cd0e1f5c7da8e92db5
Signed-off-by: Prachee Ramsinghani <pracheer@codeaurora.org>
Detect single and multi threaded heavy workloads based on loads
received from interactive governor.
- If the max load across all the CPUs is greater than a
user-specified threshold for certain number of governor windows
then the load is detected as a single-threaded workload.
- If the total load across all the CPUs is greater than a
user-specified threshold for certain number of governor windows
then the load is detected as a multi-threaded workload.
If one of these is detected then a notification is sent to the
userspace so that an entity can read the nodes exposed to get an
idea of the nature of workload running.
Change-Id: Iba75d26fb3981886b3a8460d5f8999a632bbb73a
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>