Commit graph

7 commits

Author SHA1 Message Date
Siddartha Mohanadoss
886b302462 thermal: msm_tsens: Fix clearing interrupt bit on resume
Clear the Lower/Upper threshold interrupt bit on resume. Having
the interrupt bit set prevents interrupts from being triggered
when TSENS block is enabled before it goes into suspend.

CRs-Fixed: 322042
Change-Id: Ida283fb2bbbed8032f2c72efc4e5015eb5f43ac9
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:33:38 -08:00
David Brown
81694ada30 thermal: msm_tsens: Remove redundant license clause
Remove the superfluous FSF address from the license text.

Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:33:37 -08:00
Siddartha Mohanadoss
8968ae08cd thermal: tsens: Add suspend/resume for TSENS
TSENS does not operate reliably during VDD_CX minimization.
Incorrect temperature readings are reported on some instances
when Apps processor comes out of suspend. This leads the
TSENS interrupt being triggered in critical temperature zone.

Thermal sys takes drastic action of shutting down the phone
which is not desired. Hence remove updating the thermal sys
on temperature changes as its not required.

CRs-Fixed: 309855
Change-Id: Id6186b2a6032150273bc0d74d91c72db5a077ac7
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:33:20 -08:00
Abhijeet Dharmapurikar
95db9f4073 thermal: msm_tsense: fix request irq ordering
Triggering an irq might cause an update to the thermal zone device.
If the thermal zone device is not initialized then a kernel panic ensues.
Request the irq after the thermal devices have been initialized, this way
the isr will be called only after it is initialized.

Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
(cherry picked from commit 8e85855631a198d27d422cd680c051d0e948e276)

Change-Id: Ieaa753e870ea86d0c56860b4fe2faceba4c2451a
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:33:14 -08:00
Siddartha Mohanadoss
e4f930189a thermal: msm_tsens: Fix notify to userspace.
Fix notification of event to userspace on receving the
tsens interrupt on threshold temperature changes.

Change-Id: Idf818ed171f146ca38a1db2264bf2a17e55ecace
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:33:13 -08:00
Yan He
e4fa1d1481 thermal: msm_tsens: add calibration for Tsens
Add calibration for Tsens temperature calculation;
Rewrite the conversion functions between temperature degree and ADC code;
Set TSENS_CONFIG bits (bits 29:28 of TSENS_CNTL) to '01'
because this setting is found to be optimal.

Change-Id: Ie40abb1f11c43b60b9a5a58eb84d360b190a2d02
Signed-off-by: Yan He <yanhe@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:33:12 -08:00
Siddartha Mohanadoss
920345890d thermal: msm_tsens: Add temperature sensor driver
The msm_tsens driver provides temperature notification to
thermal sys driver once the set threshold temperature
is reached and supports configuring the temperature
thresholds. The thermal sys interface is used by userspace
clients to set the configurable temperature thresholds and
receive notification.

Change-Id: I4fcbd2d88a1d36b9eacaeca1925cfe2d3b72f3d9
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:33:11 -08:00