Fix the incorrect register shift masks used for one point
calibration read from the efused region. The order for
one point and two point calibration is swapped in the
efuse memory region. Change the driver to update the
above change made in HW.
Change-Id: Ic3382bad8336fd2f9fa6955091b941ee0bda43b1
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
The slope used for temperature calculation is code/degC.
Change the implementation of the equation of the line
to use the slope as code/degC instead of degC/code.
Update the control register default initialization data to
perform a periodic update of the temperature data to the
status registers.
Change-Id: Ia222e4ffa4009767a570a083910a37fd1823011c
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Dereference the thermal device pointer only after checking
that it is valid.
Change-Id: I5619b14f2d37969e59a16a64b6011c1dba9b2e15
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Enable TSENS for calibrationless mode. Previously the
temperature readings from non-calibrated sensors had
high accuracy errors which made it not desirable to
enable TSENS without calibration.
With support for calibrationless sensors the accuracy
of the temperature is within acceptable range to have
it enabled before support for one and two point calibration
is added. Calibrationless sensor uses default slope and
offset based on characterized chip data.
Change default initialization configuration for individual
and remote sensors.
Change-Id: I9186b135508e6a66d312a3862e511ff3e87e4ab6
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
MSM8974 TSENS block supports 11 temperature
sensors that are used for thermal mitigation.
The TSENS driver is part of the thermal sysfs
framework that allows clients to set thresholds
and receive notification on temperature thresholds
being crossed through thermal sysfs.
The driver provides ability to thermal clients
to set upper/lower thresholds for each sensor
and receive individual notification for each
sensor once the threshold is crossed.
All sensors are enabled by default during
driver initialization.
The driver is initialized early during kernel
initialization to provide capability to the
thermal kernel driver to read temperature
from the TSENS sensors. To support this feature
a kernel API is provide to read the TSENS
temperature.
Change-Id: If17daae81cfb522a9cea786b5db0c920adb5ed2d
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>