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>
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>
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>
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>
Move the qpnp-power-on driver from the drivers/input directory
into the drivers/input/misc directory. This is the standard
location where other power key drivers are kept.
Also make a small fix to use octal instead of symbolic
permissions for the ship_mode_en module parameter.
Change-Id: I4d80c2ca0f161bd443dbfe0fcef822459c9fe44b
Signed-off-by: David Collins <collinsd@codeaurora.org>
Update the code name from msmfalcon/apqfalcon to sdm660/sda660.
As part of this, update the filename containing "falcon" and
files content containing "falcon".
Change-Id: Iec85862251b9e1b4dcc8bdce8b214ce87c0049bc
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Update the code name from msmcobalt to msm8998. As a result, update
the filename containing "cobalt" and files content containing "cobalt".
CRs-Fixed: 1070840
Change-Id: I2c7b95e3e2a2fec7730724da9eeb86a39a77faf1
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
PMICOBALT supports reading the FAB ID from the REVID
peripheral. Add an optional property qcom,fab-id-valid
to check if support for FAB ID is available in the
REVID peripheral for the PMIC.
Change-Id: If8212618baa7533b008228a71740acf1d6c72a52
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
The header file currently has incorrect function declaration when
CONFIG_QPNP_HAPTIC is disabled and set to be compiled or set
as a module. Declare the functions static and inline them.
CRs-fixed: 1058405
Change-Id: I69b7e5542f561735ed044bdaf49f855b57777c84
Signed-off-by: Clyde Byrd III <cbyrd@codeaurora.org>
Buck damage was observed because the OOB comparator activated
when HSFET was on, causing a direct short from VBUS to ground. Fix this
on V1.1 by increasing the OOB comparator threshold. On 2.0 this is fixed
by ensuring the OOB comparator activates only after HSFET minimum on
time. This in turn guarantees that HSFET and LSFET won't be on at the
same time.
Since the driver needs to detect the version of the smb, make use of the
qpnp-revid module.
CRs-Fixed: 1055113
Change-Id: I0a7946db2f1bdacf1974fb508da46f2ed4dadadc
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Add support to scale reverse thresholds on VADC_TM refresh
peripheral for voltage measurements such as vbatt, vph_pwr,
thermistor channels, PMIC die temperature.
VADC_TM refresh uses one interrupt for high and low threshold
notification. Update the sequence to check the respective
sensors status for high/low threshold crossing for the VADC_TM
refresh and notify the clients on a threshold crossing.
Change-Id: I070b537e14b505bc247f2f5e6a0e125f1d0fbb81
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Some workarounds need to be applied only for v1.0 and v1.1 of
pmicobalt. For drivers to check and compare the versions, add
definitions for pmicobalt versions.
CRs-Fixed: 1018090
Change-Id: I3c6c0b470c7d15802c7cf4cb8ced85548dbb81c7
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
The BTM (Battery temperature module) peripheral driver
on the PMIC (Power management IC) supports threshold
monitoring and notifies clients when thresholds are crossed.
PMCOBALT supports refreshed BTM peripheral register interface
and the driver uses compatible property qpnp-adc-tm-hc to
distinguish using the refreshed peripheral. The external
client interface with the driver remains the same. Updates
include handling the interrupt when the thresholds are
crossed,programming the threholds and configuring
the hardware based on the refreshed design.
BTM peripheral needs the VADC_HC peripheral to compute the
gain/offset that are used to reverse compute the threhold
values to ADC code. Some of the reverse computation API's
such as calculating thermistor thresholds require the
gain and offset values before computing the ADC code to
be programmed. This requires modification to the existing
calibration API in the VADC_HC driver to calculate
the reference calibration points and store these values
for clients to use in the reverse computation
Change-Id: I989cfa4f40e7f1671f04dfa9d4c3fe2ccbbc44ab
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Change the PMIC names to use PMCOBALT and PMICOBALT.
Change-Id: Ia2c9be4ec36f522968364ebb66190278cfbb9244
CRs-Fixed: 1007932
Signed-off-by: David Collins <collinsd@codeaurora.org>
The subtype register value for PM8005 is 0x18. Add this to the
list of known PMICs.
Change-Id: I5cd316784f1339975a973e63c962fae6cb9db852
CRs-Fixed: 986619
Signed-off-by: David Collins <collinsd@codeaurora.org>
The TYPE for a PMIC chip is always 0x51. There is no need to define it
for each PMIC chip.
Also the SUBTYPE of a PMIC chip doesn't change with versions. Have a
single definition of the SUBTYPE per PMIC chip.
Also, the driver uses integer indexes to get to the pmic name, instead
use the SUBTYPE to index in the pmic names array.
Change-Id: Ie1c43f3db0d4a395307253aad347ad93624a1203
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This snapshot is taken as of msm-3.18 commit dbdb6776f
(Merge "msm: camera: Add dummy sub module in sensor pipeline")
Fixup compilation to support int type for temperature
value as part of thermal ops API upgrade.
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Change to using upstream spmi bus architecture. All the spmi devices,
marked by spmi-dev-container, become platform devices.
spmi-slave-container devices become spmi_devices each representing
a slave. The read/write functions use regmap api's instead of calls to
spmi_ext_register_read/write() implemented by the spmi bus. This
regmap is instantiated per slave.
The spmi bus helper functions like spmi_get_irq get changed to their
platform bus equivalents.
Change Kconfig files include
* Remove dependence on OF_SPMI, MSM_QPNP_INT
* There were few places where an earlier commit
dcc2aedc80746acee589e4b47d3e6adf5d3ec253
missed adding dependence on SPMI along with MSM_SPMI.
Fix them.
* Add depends on ARCH_MSM. ARCH_MSM is used for internal builds.
Change the nodes in DTSI files to confirm to the modified drivers.
Update their binding docs to drop spmi-dev-container and
spmi-slave-container;
Finally update defconfig to use upstream SPMI.
Change-Id: Ic85bff27c09c84b152cb38acbc3cadd05c0ec57a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This snapshot is taken as of msm-3.18 commit
9da4ddc (Merge "clk: msm: clock-gcc: Associate gfx rail
voting with gfx3d branch")
Change-Id: Idd2f467f1f1863a156d1757589dfe78158f0e43f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Enable client drivers, which are using these non-standard PWM
API's (FB_MSM_MDSS), to be compiled when QPNP PWM is not enabled.
Change-Id: Id7add4009591ec4f3bd095b989aa7f8c0169dfa4
Signed-off-by: Ivan T. Ivanov <iivano@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>