linux_dsm_epyc7002/drivers/thermal/qcom
Amit Kucheria 8b71bce407 drivers: thermal: tsens: Get rid of id field in tsens_sensor
There are two fields - id and hw_id - to track what sensor an action was
to performed on. This was because the sensors connected to a TSENS IP
might not be contiguous i.e. 1, 2, 4, 5 with 3 being skipped.

This causes confusion in the code which uses hw_id sometimes and id
other times (tsens_get_temp, tsens_get_trend).

Switch to only using the hw_id field to track the physical ID of the
sensor. When we iterate through all the sensors connected to an IP
block, we use an index i to loop through the list of sensors, and then
return the actual hw_id that is registered on that index.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/30206cd47d303d2dcaef87f4e3c7173481a0bddd.1572526427.git.amit.kucheria@linaro.org
2019-11-07 07:00:26 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
qcom-spmi-temp-alarm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
tsens-8960.c drivers: thermal: tsens: Get rid of id field in tsens_sensor 2019-11-07 07:00:26 +01:00
tsens-common.c drivers: thermal: tsens: Get rid of id field in tsens_sensor 2019-11-07 07:00:26 +01:00
tsens-v0_1.c drivers: thermal: qcom: tsens: Fix memory leak from qfprom read 2019-08-28 21:05:08 +08:00
tsens-v1.c drivers: thermal: qcom: tsens: Fix memory leak from qfprom read 2019-08-28 21:05:08 +08:00
tsens-v2.c Revert "drivers: thermal: tsens: Add new operation to check if a sensor is enabled" 2019-05-28 19:30:33 -07:00
tsens.c drivers: thermal: tsens: Get rid of id field in tsens_sensor 2019-11-07 07:00:26 +01:00
tsens.h drivers: thermal: tsens: Get rid of id field in tsens_sensor 2019-11-07 07:00:26 +01:00