Commit Graph

2747 Commits

Author SHA1 Message Date
Wei Wang bb454f3bae ANDROID: fix uninitilized variable
Currently we set CONFIG_CC_OPTIMIZE_FOR_SIZE which suppressed the compiler
warning of unused variables which can lead undefined behavior e.g. memory
corruption and panic. See https://lkml.org/lkml/2013/3/25/347.

This patch fixes all the uninitilized variables in kernel

Bug: 33353384
Test: On device
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I0ae1082f447b435d71156d471878ba71aa16c378
2019-07-27 22:10:15 +02:00
Mahesh Sivasubramanian 36efb53c4e drivers: qcom: lpm-stats: Fix undefined access error
In cleanup_stats(), a freed memory pointer pos might be accessed for
list traversal. Switch to using _safe() variant of the list API to
prevent undefined accesses.

Bug: 79421260
Change-Id: I7d068cb7813ccb9bfdbcab4646b4ec890145828a
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2019-07-27 21:50:48 +02:00
Wei Li f27273f9e1 angler: remove 'reboot edl' interface for security
Removed edl interface for security reasons.

BUG: 63100473
Change-Id: I9bdcb6b9794e2bc59c6557b6160cf964cc61265c
Git-commit: 6bf0876eb2a65282d796620ef2c640a86a61df82
Git-repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Kishor PK <kpbhat@codeaurora.org>
2018-05-26 00:39:32 +02:00
LuK1337 5b3e93db49 power: reset: msm: Reset to LA.BR.1.3.6-05010-8976.0
* For some reason 'hard reset' is being used for
  recovery command. Rather than trying to understand
  why is this happening it's way easier and cleaner to
  just reset this to latest CAF tag as we don't need to
  support custom reboot commands that Samsung implemented.
2018-02-06 13:12:28 +01:00
LuK1337 b2213f5c42 Merge tag 'LA.BR.1.3.6-05010-8976.0' of https://source.codeaurora.org/quic/la/kernel/msm-3.10 into cm-14.1-merge
"LA.BR.1.3.6-05010-8976.0"
2017-11-22 00:26:48 +01:00
Maulik Shah e13054cd17 power: qcom: msm-core: Add mutex lock for ioctl
There can be use after free with multiple ioctl calls.
Add mutex lock when updating userspace power.

Change-Id: Ieae08d05478a462b19cf7f91b64267177eaebe84
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2017-11-13 22:30:16 -08:00
Archana Sathyakumar 1352b581d6 msm-core: Ensure the userspace data is copied before access
Userspace data is directly used without copying it to kernel memory.
Ensure all the data reads within ioctl happen from the kernel memory.

Change-Id: I17f6c0c4675e64e121c166b0a062e83a4c5c9757
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2017-10-11 05:21:14 -07:00
LuK1337 2a649dacb5 Revert "power: reset: msm: Don't override power off type for GTS210VE"
This reverts commit 83933e7846.
2017-04-20 13:32:11 +02:00
LuK1337 83933e7846 power: reset: msm: Don't override power off type for GTS210VE
* Doesn't seem to work very well on MM firmware.

Change-Id: Ie292b288a865cf2c1fcc078f3a830705b06d4f22
2017-04-19 17:02:37 +02:00
Luca Stefani 062311b2df This is the 3.10.99 stable release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJW2MPMAAoJEDjbvchgkmk+xlkP/3pLYC8OxOPz11sBFOWDB6Jn
 +/La3kW252TMcY7K8Z6R2UJC93HxXaCySAZTrLrwUL6mqpSStiHhX/1HQMI6If4c
 jMtsbgWpU+HZzprPzY8IK6rdrZJKz+Nxu3LMuV0pYTAFKLnCa4d9bSYZ52UArVnC
 w13KGpk/gnWTO7A6ZNx4dcRpMqYHWcG+eJsT9zdExmyk65qBCxhhUxXh+DijmSn7
 QXrFJ4zjWr1kIdsk6Moat/HCTt/zvwMiWuHdnqYIzUSmvWZWbaQsqGw0cFvKM2hL
 pOJ3zf3fgUY6fsV0vG+SFdrMmL6RtL/v0c2EGM5ZlYCIPbUZcK+XMlaEqOe6UAHz
 hITIE+r03l2zqagWVb/2HOen8liHIxnfqUPYgHd6vmXz2qWXg9sWTsOhr3ZAQQLA
 tf0JDjmx/KCyBmiA7ZyhRLeyhx0jD/csxxo14YME8N3tJCyw5gEIOgXlOLNxhWRu
 uCqSN27FDnnf6ppbX1euMeWxzqi4DCZFMDJQT743V5sJIz10BsVR9HJS6mwyUioN
 ia4qVc99JfSEsXuawlZhC44Ht+Z/tTSxQPcZjWMHvftGVfxS9AZVf85BM5zNa91t
 52mtJivT25N7JxHE41iEQA9t4V1shCjGmEUKD4cVMKgC18cpXD/awDlJ1Or1YuAO
 ro6ElZeHj+O3YETFp31/
 =GlVi
 -----END PGP SIGNATURE-----

Merge tag 'v3.10.99' into HEAD

This is the 3.10.99 stable release

Change-Id: I8113e58a5519664be2acc502462633d6d2f9ebf5
2017-04-18 17:17:46 +02:00
LuK1337 4e71469c73 Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD
Change-Id: Ie506850703bf9550ede802c13ba5f8c2ce723fa3
2017-04-18 12:11:50 +02:00
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00
Raju P.L.S.S.S.N 58c7003d40 msm: pm: Add mutex lock for shared data
The buffer allocated in file open operations need to be
protected as there can be a possiblity of use-after-free
scenario.

Process A              B
        |              |
      open             |
        |              |
      read started     |
        |             close

Add mutex lock to protect the buffer to avoid this.

Change-Id: I1e066fd0a047bcec2af7829015089d5c882fb2f3
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
Signed-off-by: Naresh Malladi <namall@codeaurora.org>
2017-02-14 22:23:17 -08:00
ansharma b463edce69 power: qpnp-fg: Fix possible race condition in FG debugfs
There is a possible race condition when FG debugfs files are concurrently
accessed by multiple threads. Fix this.

CRs-Fixed: 1105481
Change-Id: I154e7f3cdd8d51cf67ef1dfd9d78f423f183cb64
Signed-off-by: ansharma <ansharma@codeaurora.org>
2017-02-10 01:20:37 -08:00
Mohammed Khajapasha c64dad0167 msm-core: use get_user() API to read userspace data/settings
Currently userspace data is getting accessed directly
and leading to crash, So use get_user() API to copy
userspace data/settings to kernel space.

Change-Id: I3a75ec9503d8207829640bf88e1c3160bf72c9f0
Signed-off-by: Mohammed Khajapasha <mkhaja@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2016-12-06 21:39:25 -08:00
Pradosh Das 72b69ffec9 Merge commit 'b73847a75055daf57295a8d32fd2c3f998d0b72a' into HEAD
Change-Id: I240d1eae11f98e46ac3c3dfbd69805e4343921fd
Signed-off-by: Pradosh Das <prados@codeaurora.org>
2016-09-08 23:14:17 +05:30
Archana Sathyakumar 8c41e8ce45 msm-core: debug: Update the number of supported pstates
Update the number of power-freq pair value supported in the debug
interface. Parse the arguments as uint32_t instead of uint64_t which
might cause memory corruption.

CRs-fixed: 1054344
Change-Id: I30492b79b96356177cdcc72e4e2ee656317de500
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2016-09-06 11:35:44 -07:00
Archana Sathyakumar 96ca873faf msm-core: debug: Fix the number of arguments for sysfs nodes
Ptable and enable node parses the input arguments incorrectly. Parse the
input message into exact number of arguments that are required for the
respective nodes.

CRs-fixed: 1032875
Change-Id: I881f18217b703a497efa4799288dee39a28ea8ab
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2016-09-05 09:23:05 -07:00
Anirudh Ghayal 352507518e power: qpnp-smbcharger: Handle USB removal during pulsing
Handle removal of USB during QC 3.0 pulsing operation.
While at it, cancel hvdcp detection work before updating input
status to USB driver on charger removal.

CRs-Fixed: 1011956
Change-Id: I28cf37e60746eab126e7cd6822de9b35b8f832bf
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-08-10 15:29:45 +05:30
David Ng 6fce76927e power: reset: msm: Handle dm-verity and keys reset reasons
Write magic cookies to indicate reasons of dm-verity corruption,
re-enable enforcing mode, and (unrelated) keys clear.

Change-Id: I49904c79940515863d794b23fa7ac84e472b2466
Signed-off-by: David Ng <dave@codeaurora.org>
2016-08-08 05:36:18 -07:00
Linux Build Service Account ff694c5bf8 Merge "power: qpnp-smbcharger: add support to control hvdcp3 detection dynamically" 2016-07-04 10:49:12 -07:00
Subbaraman Narayanamurthy b9e122ec6d power: qpnp-fg: Re-enable empty soc interrupt configuration
On certain circumstances, empty soc interrupt cannot fire even
with the proper configuration. Clearing the empty soc config
and setting it back again after a FG cycle (~1.5 seconds) is
the only way to trigger empty soc interrupt again. Add it.

While at it, remove some unused macros in the driver.

CRs-Fixed: 1003838
Change-Id: I5dda1b52e19eb2086543035e0d8d1998ce709d53
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-06-24 00:35:56 -07:00
Subbaraman Narayanamurthy 3e1f798189 power: qpnp-smbcharger: do not float DP/DM lines during QC3.0 detection
Currently, we request USB PHY to float DP/DM lines in usbin_uv
handler whenever USBIN_UV and SRC_DET bits are not set during
a charger insertion. This is to help with charger to run APSD
on DP/DM lines without any interference from USB PHY.

Eventually during QC3.0 detection, we run fake removal and
insertion in between. During this sequence, we disable APSD in
charger as well thereby floating DP/DM lines for a period of
~800ms. On some charger adaptors, this is detected as a different
charger type failing QC3.0 detection and also failing to operate
in QC2.0 mode.

Fix this by setting DP to 0.6V and DM to floating after fake
removal and before disabling APSD. Also, do not request USB PHY
to float DP/DM lines again during fake insertion.

CRs-Fixed: 1006776
Change-Id: I3a9f2ef71b657b3926ccd2325585c9b2a4edead9
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-04-27 06:30:38 -07:00
Linux Build Service Account ca467adb9a Merge "power: qpnp-smbcharger: handle the regulator probe deferral properly" 2016-04-06 14:22:37 -07:00
Ashay Jaiswal 80978600d4 power: qpnp-smbcharger: Force input current limiting during pulsing
Force input current limit to 300mA during QC3.0 DP/DM pulsing for PMI8950.
While at it, update the error handling during pulsing to force 9V QC2.0
in case of failure.

CRs-Fixed: 984187
Change-Id: I7d48ff9fb4505dae1ed231691ba8efcd845df27c
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-04-05 02:19:10 -07:00
Ashay Jaiswal 5b0789d52c power: qpnp-smbcharger: re-arrange parallel charger detection check
In scenarios where fast-charge/taper interrupt fires even before
src_detect_handler detects the parallel charger, parallel charging
will remain disabled. Fix this by adding a parallel charger detection
check in fastcharge and taper handler.

CRs-Fixed: 984187
Change-Id: I082cad6cf1bc3e8d9a5c327222f72d046190f9ca
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-04-05 02:18:31 -07:00
Ashay Jaiswal 979a694b75 power: qpnp-smbcharger: add support for high current SDP/floating charger
Add support to configure high ICL for SDP chargers, this is useful in case
of SDP or floating chargers which supports high current.
If 'qcom,override-usb-current' property is present override and set ICL
based on current reported by the USB driver otherwise set to USB500 mode.

CRs-Fixed: 963417
Change-Id: I31304cd2a4e710f4e450e6ec5a4da90c50fdfc88
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-04-05 02:17:52 -07:00
Ashay Jaiswal 53357feb74 power: qpnp-smbcharger: remove current limit vote on charger removal
Remove vote for input current limit(ICL) on  charger removal, this
will make sure ICL voter state is updated on charger removal and
vote for next insertion is not discarded as duplicate request.

CRs-Fixed: 981047
Change-Id: Iab16d12d27920183251820659c40d149c01b731e
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-04-05 02:16:56 -07:00
Subbaraman Narayanamurthy 73e82f426b power: qpnp-smbcharger: handle the regulator probe deferral properly
Currently, if regulator_register() of smbcharger-external-otg
regulator returns an error (e.g. -EPROBE_DEFER),
regulator_unregister() is not called for smbcharger-boost-otg
regulator which got registered before that.

This causes problems during bootup later because of an invalid
regulator device being left registered indefinitely.

Fix this by unregistering the regulator that got registered
already when there is an error in registering the other.

CRs-Fixed: 895622
Change-Id: I363693888f357555dbb82ef2566ed855cea9fe94
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-04-04 11:33:37 -07:00
Subbaraman Narayanamurthy 18a738338d power: qpnp-smbcharger: add support to control hvdcp3 detection dynamically
Currently, HVDCP3 detection is enabled by default. Add support
to control it dynamically through a power supply property
"allow_hvdcp3".

If hvdcp3 adapter is connected and "allow_hvdcp3" is set to
false, it will get detected as hvdcp.

CRs-Fixed: 991060
Change-Id: Ibc1523f218fb55577c09b9b8317e5aac45d0fb6c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-30 16:47:57 -07:00
Subbaraman Narayanamurthy 5516d8e60a power_supply: add support to control hvdcp3 detection
Currently, HVDCP3 detection is enabled by default. Add support
to control it dynamically through a power supply property
"allow_hvdcp3".

CRs-Fixed: 991060
Change-Id: Id283b572cdb51094ad53d590e230104dc3e1beb7
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-28 18:06:03 -07:00
Ashay Jaiswal 9372b611e0 power: qpnp-fg: fix capacity learning wake-up source handling
In case of hardware coulomb counting based capacity learning the
wake-up source is not released in error conditions. Fix the same.

CRs-Fixed: 977956
Change-Id: I816642281aa2663b504ef3532653ff49aecc4f30
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-03-21 01:05:08 -07:00
Valentin Rothberg 621264c889 wm831x_power: Use IRQF_ONESHOT to request threaded IRQs
commit 90adf98d9530054b8e665ba5a928de4307231d84 upstream.

Since commit 1c6c69525b ("genirq: Reject bogus threaded irq requests")
threaded IRQs without a primary handler need to be requested with
IRQF_ONESHOT, otherwise the request will fail.

scripts/coccinelle/misc/irqf_oneshot.cocci detected this issue.

Fixes: b5874f33bb ("wm831x_power: Use genirq")
Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 15:06:20 -08:00
Maulik Shah f0104a2aa0 Revert "driver: lpm-workarounds: disable/enable L2 low power modes"
This reverts 'commit 9890d1939491 ("driver: lpm-workarounds:
disable/enable L2 low power modes")' as power regression seen
with disabling L2 low power modes.

Change-Id: I2a4fea67a62065c64bfa7ec3af8a20a18480dd13
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2016-02-08 21:59:15 -08:00
Xiaozhe Shi c3c9622215 power: smb1351-charger: report icl status in parallel mode
Report the input current limited status via the power supply in parallel
mode in order to better optimize for HVDCP usecases.

CRs-Fixed: 930588
Change-Id: I9d802227ebd0289b796477020a51826717fc908f
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2016-01-04 21:09:32 -08:00
Anirudh Ghayal e68e8055ef power: qpnp-smbcharger: Update the aicl-restart timer values for SCHG_LITE
SCHG_LITE supports additional aicl-restart values, update the table
accordingly. While at it, use the right mask to update the AICL_WL_SEL
register.

CRs-Fixed: 954243
Change-Id: Icf18c1556c4598896c5ae6d0e9ed55bbd46fa41e
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2015-12-29 01:50:04 -08:00
Anji Jonnala 0bf12f4ee0 driver: lpm-workarounds: disable/enable L2 low power modes
when device battery capacity is less than 2%, PLL turn on
through spm is not working and causing lpm workarounds to
get struck in infinite loop.
Register for power supply notifications and postpone the
L1/L2 dynamic clock gating enablement till battery reach
safe level.

Change-Id: I21acdc6b097937bc54a06b72434e0a0a61570b8a
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
2015-12-17 11:30:39 -08:00
Anirudh Ghayal 3b95baa5ec power: smbcharger: Re-run AICL irrespective of the AICL status
In the current implementation AICL is not re-run if its already
in progress. However in case where ICL gets updated while AICL
is in progress, the updated ICL value is not considered unless
AICL re-runs again. Handle this by re-running AICL irrespective of
the AICL status.

CRs-Fixed: 907473
Change-Id: I4a021e6ca148d0c218701cfb8a671d1e2dac6fee
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2015-12-03 04:16:14 -08:00
Xiaozhe Shi bbb7583442 power: qpnp-smbcharger: add module params for default ICL
Add module parameters to configure default ICLs for USB DCP and HVDCPs
in order to facilitate testing.

CRs-Fixed: 930588
Change-Id: I5fa1cdef010821211d3baa1797fdb72110d86a10
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:14:57 -08:00
Xiaozhe Shi 77f591822f power: qpnp-smbcharger: vote for FCC as BATT_TYPE
Use the BATT_TYPE voter for FCC instead of USER. This way the user can
set FCCs higher than the device tree limit.

Change-Id: Id386f8afd1bef2d1774730b214f1b97d64a6476b
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:14:41 -08:00
Xiaozhe Shi c8cb98c268 power: qpnp-smbcharger: support ICL adjustments through DP_DM
Support adjusting the usb ICL up and down through the DP_DM interface for
HVDCP 3.0.

CRs-Fixed: 930588
Change-Id: Ic24f946522d7ae0ec0a52f127118ac5a0d908277
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:14:22 -08:00
Xiaozhe Shi 6f21b4137a power: qpnp-smbcharger: draw more current from PMi in parallel chg
Current the smbcharger is splitting the ICL and charge current fairly
naively. This can cause problems where one charger is FCC limited and
another charger is ICL limited, causing a lot of wasted charge current.

Do a better current distribution to maximize the amount of charge
current going into the battery. By default, raise the ICL ratio of the
primary charger up to 60% to avoid issues with system load prematurely
causing the charger to current limit. Lower the FCC ratio back to 50% to
accommodate this.

Also, make both of these properties configurable through module
parameters and device tree in order to accommodate differences in pcb
and battery limitation.

CRs-Fixed: 930588
Change-Id: I77ec8483232e4297936baaad1e9bb4399474d444
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:13:37 -08:00
Xiaozhe Shi 8855a2d303 power: qpnp-smbcharger: optimize HVDCP 2.0 efficiency
At 9V, the smbcharger is more efficient at a switching frequency of
1MHz. Switch to this when the driver detects that it is in HVDCP 2.0
mode. Also, switch the VFIX clamping voltage threshold so that the
frequency is maintained.

CRs-Fixed: 910651
Change-Id: I4b8e1d360fe301671e882f20b2460cdb737204b0
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:12:57 -08:00
Xiaozhe Shi 76670c43fe power: qpnp-smbcharger: charge at 3A for HVDCP chargers
Allow the charger to pull 3A of charge current from HVDCP chargers,
since they are certified to handle that much current.

CRs-Fixed: 918587
Change-Id: I411da6ffe0756ed8c3f3b23d1ed13cd31dbb7fa1
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:12:29 -08:00
Devesh Jhunjhunwala f02f1565b9 power: qpnp-smbcharger: fix bug in find_closest_in_array
This method uses a variable to track the current closest value's
index. The implementation was checking the distance between the
value and this index instead of the value at that index. Fix
this bug.

CRs-Fixed: 923805
Change-Id: Iac3cc125c4c5fabbe027ec38890d5c47e199187e
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2015-12-03 04:12:05 -08:00
Xiaozhe Shi a1206eb583 power: qpnp-smbcharger: ignore battery ov
The smbcharger's battery overvoltage detection cannot be trusted.
Many times, it will trip even though the battery voltage is still well
within safe limits. Because of this, simply ignore the interrupt if it
fires.

CRs-Fixed: 924317
Change-Id: I57decb3a11f6b7bacbe82b0fe69c844f308e890d
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:11:41 -08:00
Nicholas Troast d2d51db4a3 power: pmic-voter: handle scenarios where voter state is invalid
After the voter is initialized and before the first valid vote
is made, the voter state is invalid. Introduce some changes to
accommodate this state:

1. Initialize effective_result and all client states to -EINVAL.
2. If the current vote does not change effective_result, or if
   there are no valid votes in the array, skip the callback and
   maintain the current effective result.
3. Allow the user to provide a default_value, which is returned
   in the scenario where the effective_result is queried before
   making a valid vote.

CRs-Fixed: 927044
Change-Id: Ic00064d95e5a9234bcf44a415ad2bbff6e84a2f3
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2015-12-03 04:11:14 -08:00
Xiaozhe Shi 0d08b01bc8 power: qpnp-smbcharger: register aicl_done for rising edge only
The AICL done interrupt rises when an valid AICL measurement or collapse
occurs, and falls when a new AICL measurement starts. The software is
only interested in when a valid AICL measurement becomes available.
Disable the falling edge case for this interrupt since it just becomes
more noise for the driver.

CRs-Fixed: 920791
Change-Id: Idf8471dfe4bba731480a09e43af8d791a71a122e
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:10:57 -08:00
Xiaozhe Shi 0b006c7b0e power: qpnp-smbcharger: read realtime status for battery ov
Some times the battery ov status appears to not change even though the
status changes. This could be attributed to a fast battery ov pulse not
triggering the down interrupt.

Read the batt-ov status instead for reporting to the userspace.

Change-Id: I5bdb8cc6564ad37dde0e5901f0543a1c1b7b8761
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:10:43 -08:00
Xiaozhe Shi 07d385bc55 power: qpnp-smbcharger: allow configuration of aicl rerun period
Add the dtsi property qcom,aicl-rerun-period-s in order to allow for the
configuration of how often AICL is reran in hardware.

CRs-Fixed: 920791
Change-Id: Id262f26b409d75f7c82ee79b25c4258baed43840
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:10:27 -08:00