After the introduction of "33c24b sched: add cpu isolation support"
select_fallback_rq() might sometimes be unable find any CPU to place
a task on. This happens when the all online CPUs are isolated and
the allow isolated flag is set to false. In such cases, we have
little choice but to use an isolated CPU and wait for core control
to eventually un-isolate one or more online CPUs.
Change-Id: Id8738bd8493c11731c5491efcc99eb90f051233e
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Currently hs_vref is set to 1.5v and causes mic voltage
to go above 1.5v during audio playback at maximum volume.
Increase the threshold to 1.6v to avoid getting fake plug
removal.
CRs-Fixed: 1066750
Change-Id: I7e5788eda609821792718a276e6fe5fa97e68a4a
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
A timer might be running when we are trying to move the timer to another
CPU so ensure that we wait for the timer to finish before migrating.
Change-Id: I4c9ee39c715baebfbdb8a50476a475e38b092f70
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
On VADC_HC peripheral the ADC code can extend beyond
0-0x4000 range if the input is below 0V or if the
offset and gain error needs to be calibrated out.
Clamp the values for cases where the code represents
the value below 0V.
Change-Id: I2ede3d86d812fbdf757395d92e08e70636e9965a
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Add support for TDM on msmcobalt.
Time-division multiplexing (TDM) is a method of
transmitting data in the time domain. This can
be used to support data rates that exceed that of
the transmitted signal or to have up to 8 channel
support on a bus that normally supports less in
the frequency domain.
CRs-fixed: 1070764
Change-Id: Id3cabe07ee92a7c3546eab304f650d397b94f7de
Signed-off-by: Josh Kirsch <jkirsch@codeaurora.org>
While sending data to WDSP do not wait for the intent to be available
for ever so that diag is not blocked to send data to other peripherals.
Change-Id: I5e410ebabf4e8066abedda147879444a38b8871b
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
Remove 48khz constraint for TDM use cases. This
change is needed to support more sampling rates for
TDM use cases.
CRs-fixed: 1073307
Change-Id: Ic42b2f9e7441ffb4e1bfe8211f85aadb72c22ed3
Signed-off-by: Josh Kirsch <jkirsch@codeaurora.org>
Currently the SOC in userspace is not being updated with the latest SOC
from the fuel gauge. Add power supply changed events when the delta SOC
interrupt fires, empty SOC interrupt fires, or when the charging status
changes to full.
Change-Id: I4bbf404639a97dcc443c9ecc8391623e2fff13fd
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
The fuel gauge can count the number of times the battery has charged
across a particular SOC range. Enable it.
Change-Id: I5adc7c2fca73aad765062360cf560eae2eee7d1e
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
The SOC range is divided into buckets. Whenever the battery is charged
across a bucket we increment the counter for that bucket. These cycle
counters are exposed through the "cycle_counter" property, and buckets
are selected by modifying the "cycle_counter_id" property.
Change-Id: I923c657132d071eff4b5bc61c00fb90de8dde62c
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Currently userspace will be notified whenever the Type-C changed
interrupt fires. The charging status reflects whether or not the charger
has a valid input power source. The valid input power source status
follows vbus and not the Type-C changed logic, so in some cases the
charging status may not yet be updated when the userpace is notified
that the USB power supply has changed.
Send a USB power supply changed event when both the Type-C changed
interrupt fires, and the USB plugin interrupt fires.
Change-Id: I50cdd8c706b10f08dc7f322ea02358f3dbce521e
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
This DT bindings documentation snapshot is taken as of msm-3.18
'commit b428af643156 ("power: qpnp-fg: configure thermal coefficients based on battery type")'
While at it, change the name used in the documentation from
Qualcomm to Qualcomm Technologies, Inc.
CRs-Fixed: 1068593
Change-Id: Ib359e41b7381149a270a5772540bbc80f920919f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
The core and peripheral memory retention bits no longer need to
be set and cleared by the GDSC driver on MSMCOBALT. Instead, the
individual client drivers will use the clk_set_flags API as needed
to toggle these bits.
CRs-Fixed: 1069091
Change-Id: I898f627ce90251166a5f4314daca61e5ba958e6b
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Update the error handling when APR sends packet failed so that audio
driver can perform proper error recovery.
CRs-Fixed: 1050605
Change-Id: I6210e244e6299ec747836f40d03e92c15c6e53ee
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
Disable SP clock before programming the clock gating control
registers and enable back SP clock.
CRs-Fixed: 1061048
Change-Id: Ic19a8a67fe0e192c9c7c3f855c7eb33901ca2adc
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
The battery thermistor values are not scaled to the
appropriate units from the ADC code on the round robin
ADC (RRADC) channel data registers. Remove support to
read the scaled results for this channel and expose
only reading the raw ADC code.
Change-Id: I6ff45d25f18063cbed70181b22ab0b07b4da4dc1
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
There are some encoding changes to the following configurations
in pmi8998 SRAM. Update them.
For both v1.1 and v2.0,
- No sign bit for charge termination current
For v2.0,
- 6 bit encoding for empty voltage and vbatt_low
While at it, fix the SRAM byte location from byte 2 to byte 3 for
configuring empty voltage threshold in pmi8998v2.0.
CRs-Fixed: 1068592
Change-Id: I3a301aed1b23ab78aa86b24c11eb750502adab2f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently the FW version is taken from the sw_version field
of the FW ready event. This version is based on internal
version control revision and it is difficult to map to actual
FW version.
Fix this by using the actual FW version stored in the FW file
header record.
Change-Id: I37ac0cf1845c96e6d9e0f8fffd6481e8c32efa50
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 13cd9f758a555d1ab547b0dbed3f9d1e529230c3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1063261
Signed-off-by: Maya Erez <merez@codeaurora.org>
Add a NULL check for dispatch_q which will avoid
NULL pointer dereference in dispatcher_do_fault().
Change-Id: I429aa91f9c5fa92ce2e8b23cc4911454744f75c9
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
The efficiency of a CPU can vary across SoCs depending on the cache size,
bus interconnect frequencies etc. Allow specifying this from the device
tree. This value overrides the default values hardcoded in the efficiency
table.
Change-Id: If2885675ce3d7b43c3b2568fe1e29a76f48a5c3d
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
On a HMP system, scheduler needs to know efficiency factor
(instructions-per-cycle) for various cpus. This is so that scheduler
can estimate bandwidth consumption of tasks on each cpu, based on
their efficiency factor.
This patch defines arch_get_cpu_efficiency() API in ARM32 architecture.
It depends on hard-coded "efficiency" factor for various cpu types
(available in 'table_efficiency' data structure) and device-tree
providing information on cpu-type for every cpu.
Change-Id: I561bace8a813a35a9fc624fca4861c5b1109b69b
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Change cpe driver to use %pK instead of %p.
%pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.
CRs-Fixed: 1052832
Change-Id: I741d9e5c5b415011348e862c3f1ee4fe28c3969f
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
AFE requires TX/RX PGD register CFG info based on different wcd
codecs. Send this info when AFE configs are set at initialization.
Change-Id: I0da3d41fe8c1d03baacf2f2a9d2e141c9721981b
CRs-Fixed: 877188
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
healthd expects battery voltage, current, temperature, and technology from
the battery power supply. Add them.
Change-Id: I85f589030903ead938af2712875eb5daa81710d9
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
The fuel gauge has several algorithm flags which are useful for
debugging. Add a debugfs file called alg_flags to expose them.
Change-Id: Ibeeea88e2e0745e98e8bfdfa3e086263d82e7bac
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>