Commit graph android_kernel_sony_sdm845/include/linux/qpnp
Message SHA1
thermal: qpnp-adc-tm: Update adc_tm register offsets for PMIC5
Few adc_tm registers have different offsets on PMIC5 compared
to PMIC4. Update logic to account for PMIC5 registers.

Change-Id: Icd55ceb9d358facc2e815541effe35a3e43b486c
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>

Jishnu Prakash   commited 2018-05-07 09:49:14 +05:30
d09bc698d8
Merge "hwmon: qpnp-adc: Add support to read bat_therm for PMI632"
Linux Build Service Account   authored and   Gerrit - the friendly Code Review server   commited 2018-05-04 05:20:57 -07:00
0faee21f47
misc: qpnp-misc: Add support for TWM mode
TWM (Traditional watch mode) is a low power mode supported
on the BG platform. PMIC is  configured differently
while entering into TWM mode.

Add a sysfs node to -

1. Allow the BG daemon to enable/disable TWM mode.

echo 1 > /sys/class/pmic_twm/twm_enable --> Enable TWM mode
echo 0 > /sys/class/pmic_twm/twm_enable --> Clear TWM mode

2. Allow the BG daemon to check the TWM_EXIT state.

cat /sys/class/pmic_twm/twm_exit
Value of "1" indicates exit from TWM state

Also, add a notifier to notify other modules of the TWM enable
configuration.

Change-Id: Ide2f56a80d7b21d3def6a640db71512c20d30015
Signed-off-by: Sundara Vinayagam <sundvi@codeaurora.org>

Anirudh Ghayal   authored and   Gerrit - the friendly Code Review server   commited 2018-04-22 20:16:34 -07:00
fa0300c5e0
hwmon: qpnp-adc: Add support to read bat_therm for PMI632
Add voltage to temperature lookup table and scaling function for
reading bat_therm on 30k and 400k pullups for PMI632.

Change-Id: Ia046807617952cc68ea4b13e1310ad1bd6ca5fe8
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>

Jishnu Prakash   authored and   Gerrit - the friendly Code Review server   commited 2018-04-14 05:17:13 -07:00
64c9d3ff4d
hwmon: qpnp-adc: Add support for PMIC5 channels
Add entries for PMIC5-specific channels in enum
of VADC channels exposed to client.

Change-Id: I60ea4c1678bedcd91f47ff88c771e01815f134c5
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>

Jishnu Prakash   authored and   Gerrit - the friendly Code Review server   commited 2018-03-15 01:42:24 -07:00
e1adf54937
Merge "hwmon: qpnp-adc: Add scaling support for Die temp channel"
Linux Build Service Account   authored and   Gerrit - the friendly Code Review server   commited 2018-03-08 05:06:42 -08:00
b67dd747c9
hwmon: qpnp-adc: Add scaling support for Die temp channel
The voltage measured by the HKADC is related to the junction
temperature and scaled by the following equation :-
Voltage = 1.4825 – 0.0033*Temp

Change-Id: I47812869208a9d34f38137d23693acd7446907d1
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>

Jishnu Prakash   commited 2018-03-07 19:23:00 +05:30
62aff11b22
platform: qpnp-revid: Add subtype for PM8953
Add PM8953 subtype (0x16) to be identified by
the qpnp-revid driver.

Change-Id: I01719c0b76194269f9cf26f178cfe1e24d7adab1
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>

Anirudh Ghayal   authored and   Gerrit - the friendly Code Review server   commited 2018-03-05 01:52:41 -08:00
ce54ec3bc9
hwmon: qpnp-adc: Update support to read bat_therm on QRD for PMI632
Add voltage to temperature lookup table and scaling function for
reading bat_therm on QRD for PMI632.

Change-Id: Id73fee2c1de62253cb0d3f1e2335a367840b0a30
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>

Jishnu Prakash   commited 2018-02-22 17:08:20 +05:30
20343d446e
qpnp-revid: Add subtypes for PM855/PM855B/PM855L
Add the subtypes for PM855/PM855B/PM855L that can be used by
the peripheral drivers.

Change-Id: I7133160e7198fb2d2c20af6701d4a45bb28b3fbf
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>

Subbaraman Narayanamurthy   authored and   Ashay Jaiswal   commited 2018-02-10 20:54:46 +05:30
c3d22c4295
hwmon: qpnp-adc: Add scaling support for ADC channels
Add new scale function and mapping table for batt_therm.
Add scale function support for current channels and for
chg_temp,die_temp.

Change-Id: I3e00955db40f7699dc4740e6e56d4252a4013de4
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>

Jishnu Prakash   commited 2018-01-18 11:34:59 +05:30
3b3fe94600
platform: qpnp-revid: Add REVID support for PMI632
Add PMIC subtype and revid details for PMI632.

Change-Id: Id357a5c5ed1b619e9e66515c8d81d67b190c8918
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>

Kiran Gunda   authored and   Gerrit - the friendly Code Review server   commited 2017-12-25 19:55:54 -08:00
8c383ac59d
regulator: qpnp-oledb: Clear SPARE_CTL register during disable
OLEDB_SPARE_CTL register bit is set by the PBS during the display enable
and is used during the display suspend to trigger the PBS event.
Hence, move clearing of the OLEDB_SPARE_CTL register to regulator disable.
Also enable the force_pd_ctl only for DRAX-A revisions <=2.0.

Change-Id: I339cefc91f94f772bc4f84e85f2471e1a73e4aed
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>

Kiran Gunda   authored and   Subbaraman Narayanamurthy   commited 2017-11-22 17:55:55 -08:00
f94ddd789b
hwmon: qpnp-adc: Update VADC property
Update VADC property to obtain the code for the full scale
voltage instead of the number of bits for the ADC. The
full scale code is more useful for scaling code to voltage.
Update the property as an optional property and use default
full scale code of 0x4000 for 1.875V.

Change-Id: I81b88ac2205f9e0753353230aa71c73711c378da
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>

Siddartha Mohanadoss   commited 2017-10-19 14:07:27 -07:00
d9e74fe624
qpnp: revid: Add support to read TP Rev
Some PMICs software drivers (PM660) require the TP revision
information to implement specific logic. Add an optional
property qcom,tp-rev-valid to check if support for TP REV is
available in the REVID peripheral for the PMIC.

Change-Id: Ia7a344e60bedcc6fb28d9ed9f18dc29a3d7f4fd7
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>

Rama Krishna Phani A   authored and   Harry Yang   commited 2017-08-31 12:54:48 -07:00
379c70e368
thermal: qpnp-adc: Update ADC_TM peripheral registration
Register ADC_TM peripheral with of_thermal to support
clients using thermal core to set trips and read temperature.
Update ADC_TM driver to activate the trip threshold for
warm and cool zones when thermal core sets the trip threshold
and enable the sensor.

In addition remove support for qpnp-adc-tm peripheral register
configuration.

Change-Id: Ie2d3955bfed62b183d8872cd1ce49d5f783e06ae
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>

Siddartha Mohanadoss   commited 2017-05-04 21:12:32 -07:00
697fe0ddc4
qpnp-revid: add smb1355 definitions
Add revision definitions for smb1355 i2c charger chip.

Change-Id: I60429c6462a2faa70df71d3440afe696a13fcab0
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>

Abhijeet Dharmapurikar   authored and   Harry Yang   commited 2017-04-27 00:31:07 -07:00
13f220efee
include: qpnp-revid: Add PM660L version info
Add PM660L v1.1 version macros.

Change-Id: I14c3f2110efc474686df488748b0a671f34ced90
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>

Anirudh Ghayal   authored and   Harry Yang   commited 2017-04-27 00:31:06 -07:00
58d2f60567
soc: qcom: qpnp-pbs: Add PBS driver support
The PBS driver helps the client drivers to trigger the PBS
event to execute the PBS RAM configuration as requested by the
client driver.

Change-Id: Ic5d1290ffa0b66ac7a8f68529aafcf0b871ee3e8
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>

Kiran Gunda   authored and   Subbaraman Narayanamurthy   commited 2017-04-03 20:52:42 -07:00
04967c82aa
soc: qcom: Bring in qpnp-misc driver
qpnp-misc driver supports accessing MISC peripheral registers
in certain PMICs. Bring that in.

This snapshot is taken as of msm-4.4
'commit 9af69213de64 ("Merge "block: Move bdi_unregister() to
del_gendisk()"")'

Fixed a couple of minor issues to solve checkpatch errors.
 - Use const qualifier for qpnp_misc_match_table
 - Fixed a block comment

Also, moved the location of qpnp-misc.h from include/linux to
include/linux/qpnp.

Change-Id: Iad670e41cc9b95725cf0c651c835a782314f0015
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>

Subbaraman Narayanamurthy   commited 2017-04-03 20:13:02 -07:00
e68d90f1bd
qpnp-revid: add pm660 1.0 and 1.1 definitions
Add revision definitions for pm660 v1.0 and v1.1.

Change-Id: I7aefdbe07d6c01562f9ffb17616419880cea1831
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>

Subbaraman Narayanamurthy   commited 2017-04-03 16:18:25 -07:00
b7c54a95d4
qpnp-revid: move pmi8998 and pm660 FAB_ID definitions to qpnp-revid.h
FAB_ID can be used across multiple drivers that gets revid
information from qpnp-revid driver. Move the FAB_ID definitions
in RR_ADC driver for pmi8998 and pm660 so that they can be
reused by other clients.

Change-Id: Ia61af56244161c948b0f458a77e699c1cac871b1
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>

Subbaraman Narayanamurthy   commited 2017-04-03 16:18:24 -07:00
9625c94772
hwmon: adc: Add ADC driver snapshot
Voltage ADC (VADC) and Current ADC (IADC) drivers
are used by clients to measure ADC such as voltage
phone power, thermistors and battery current.

This snapshot is taken as of msm-4.4
'commit <4f1f60e00d6a> ("Merge "ARM: dts:
msm: add nt35597 sharp panel node for sdm660"")'.

Change-Id: Ied07c12476916c181211d101786adffc2f762840
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>

Siddartha Mohanadoss   commited 2017-02-13 12:20:38 -08:00
37d9c8a22d
drivers: add a snapshot of various QPNP PMIC peripheral drivers
Add a snapshot of several Qualcomm Technologies, Inc. QPNP PMIC
peripheral drivers.  These drivers manage various modules found
within PMIC chips.

This snapshot is taken as of msm-4.4
commit d24550bbf50f ("Merge "ARM: dts: msm: Add slimbus slave
device for wcn3990 on sdm630"").

Change-Id: I842f81737eec1ca11bf31534e9299bd7a6511f6c
Signed-off-by: David Collins <collinsd@codeaurora.org>

David Collins   commited 2017-02-09 11:49:33 -08:00
8885f793f0