TSENS upper lower interrupt for all sensors will be enabled by
default. Disable interrupts during driver initialization and enable
them based on client requirement.
Change-Id: I7ad5d50ec9bb2a4c782787c7a1a6b8b42b1128fc
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
These are all driver changes needed for disablement of
CONFIG_CC_OPTIMIZE_FOR_SIZE. CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
is enabled by default once CONFIG_CC_OPTIMIZE_FOR_SIZE is disabled.
Change-Id: Ia46a1f24e8a082a29ea6151e41e6d3a85a05fd4f
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Sridhar Parasuram <sridhar@codeaurora.org>
Update sensor id flag for sdm630 such that thermal
client can obtain the HW ID for the available
temperature sensors (TSENS) with sensor ID details.
Change-Id: I70a1c7e4a420dc41591f021da499efe10b7fd6ae
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
Update sensor id flag for sdm660 such that thermal
client can obtain the HW ID for the available
temperature sensors (TSENS) with sensor ID details.
Change-Id: I6e217f734e8748c9ac5edf1c7a2b0dbf9deb9ac0
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
On certain cases we have seen usleep_range() return before
the intended minimum time parameter passed to this function.
There is no protection against wakeups and we may return
early. msleep() already has code to handle this cases since
it loops as long as there is still time.
Change-Id: I3cf1e2d7f61f5a6d42d66afb86ae3b3fe141a9e7
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Update the code name from msmtriton/apqtriton to sdm630/sda630.
As part of this, update the filename containing "triton" and
files content containing "triton".
Change-Id: Ia558be75041e41e83d304d5fb4091c2a098e87c0
Signed-off-by: Neeraj Upadhyay <neeraju@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>
Critical interrupt can also get triggerred by FSM health monitoring
logic. Add support to handle this case as well. Program cycle
completion monitoring logic registers.
Change-Id: Ibf74e3cbdb8a7b54cfb93334de6992eda553e7e5
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
Add support to mask watchdog bark interrupt and controller cycle
completion as part of critical interrupt. Add support to mask the
corresponding properties if available in the controller.
Change-Id: I9445db12044071f92715a60cb76c38d061748cfa
Signed-off-by: Rama Krishna Phani A <rphani@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>
tsens_get_hw_id_mapping() API is used by thermal
client to obtain the logical ID or HW ID mapping
for the available temperature sensors (TSENS)
controller with sensor ID details. Clients
currently query the driver on a per sensor basis.
The API update allows the clients to get the sensor
ID information at once for the available number
of sensors.
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Change-Id: Ibae066276b099ffb78c72a890a689f83e4df56a9
Temperature sensor (TSENS) driver provides ability to
thermal clients to read from on-die temperature sensors.
msmtriton supports reading from 12 on-die temperature
sensors and clients can set temperature thresholds and
receive notification.
Change-Id: Ia296ff112456f8959a2c769ab1e7afbccec23ba1
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
Update TSENS register read API call in msm_tsens_get_temp()
to no log variant to reduce the log for reads in MSM
register trace buffer (RTB). Clients can access the driver
log to check the TSENS temperature read in a circular buffer
along with associated timestamp.
Change-Id: I0e21c5966e0072eab826c92fc332c54e11cb0b23
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
TSENS (temperature sensor) controller provides capability
to program the gain and offset for individual sensors so that
the controller reports the temperature. The efuse information
for gain and offset can be read during boot and programmed
at boot initialization and the application TSENS driver
does not need to support reading from the efuse region.
Update the property for reading the tsens efuse as optional
for such cases.
Change-Id: Icd637fcd264565b06bcb90f8e6f7b26c8d112f24
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
The handle_critical_trips() api in thermal_core gets
invoked during the system resume path on 4.4 kernel.
If a thermal driver has registered for the critical trip
zone the handle_critical_trips() reads the current temperature
and checks against the critical threshold. If the
temperature value is greater than the critical threshold
the device is shutdown.
Remove registering the critical trip zone since its not
used by thermal sys clients. The driver will continue
to use it internally to set thresholds and monitor
the state of the TSENS (temperature sensor) controller.
Change-Id: Ie2024498224f078de77dd006d77cdfa99bb90eee
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Temperature sensor (TSENS) driver provides ability to
thermal clients to read from on-die temperature sensors.
msmfalcon supports reading from 14 on-die temperature
sensors and clients can set temperature thresholds and
receive notification.
Change-Id: I9421af7d1b2b83abb81af38fab5f7c6e9285a29d
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
Temperature sensor (TSENS) driver health monitor periodically
sets a very low temperature threshold on the critical trip zone
and polls to check if the trip is set. This is done on a deferred
workqueue and helps provide indication on the health of the
TSENS controller.
Change-Id: I4b16db429fead5c731dec289f0360682c92775b8
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Temperature sensor (TSENS) driver provides ability to
thermal clients to read from on-die temperature sensors.
msmhamster supports reading from 20 on-die temperature
sensors and clients can set temperature thresholds and
receive notification.
Change-Id: I57e98f2182d0c44e9c7cffec3528bb926a878fb8
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Existing controller health detection uses a critical
temperature threshold of -40degC. Update the value to -95degC
so that there are no false positives seen when min threshold
is disabled and temperature goes below the threshold value.
Change-Id: If27ecfbb7b080080074bfe142f493fbf8f53f673
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Linux Kernel 4.4 enforces the use of cvt timers in kernel and userspace.
Fix this in the tsens driver.
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Device crash is observed when the critical_irq is triggered because of
accessing uninitialized completion variable.
Update condition in critical_irq such that the completion variable will be
accessed only when initialized.
Change-Id: I0cba089882024bbe36ac4798866af4e33ee02fa2
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
MSM Cobalt TSENS supports upto 22 temperature
sensors across two TSENS controllers. Thermal
clients have the ability to set temperature
threshold and receive notification on a threshold
crossing.
Change-Id: I05d6f7cfceece6c27ef5d03b9ea3b77d409108db
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Add support to log the last 10 instances when the
tsens monitoring threshold test gets to run and
handles completion interrupt or in polling mode.
In addition clear the status before enabling the
interrupt mask for threshold monitoring and reduce
the timed wait completion during polling mode.
Change-Id: I75a376b209f15d33cdfe3e43806db0f0cf45538e
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
This snapshot is taken as of msm-3.18 commit dbdb6776f
(Merge "msm: camera: Add dummy sub module in sensor pipeline")
Commit 0b46b8a7 (clocksource: arch_timer: Fix code to use
physical timers when requested) introduces the use of
physical counters and requires clients to use api
arch_counter_get_cntvct(). Accordingly update tsens_poll()
to the new API to prevent a BUG_ON() during bootup.
Fixup TSENS to use supported int type for temperature value.
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:10:25 -07:00
Renamed from drivers/thermal/msm8974-tsens.c (Browse further)