thermal/drivers/qcom-spmi-temp-alarm: Add temp alarm data struct based on HW subtype
authorAnjelique Melendez <anjelique.melendez@oss.qualcomm.com>
Thu, 10 Jul 2025 22:45:52 +0000 (15:45 -0700)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sun, 13 Jul 2025 16:01:03 +0000 (18:01 +0200)
commit703f13285a6c5d94e67e5fe2a8c15ee51e1d76ca
tree643da7e0a0afa5c8b3b480d0bd3cf8b7b9576802
parentf8e157ff2df46ddabd930815d196895976227831
thermal/drivers/qcom-spmi-temp-alarm: Add temp alarm data struct based on HW subtype

Currently multiple if/else statements are used in functions to decipher
between SPMI temp alarm Gen 1, Gen 2 and Gen 2 Rev 1 functionality. Instead
refactor the driver so that SPMI temp alarm chips will have reference to a
spmi_temp_alarm_data struct which defines data and function callbacks
based on the HW subtype.

Signed-off-by: Anjelique Melendez <anjelique.melendez@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250710224555.3047790-3-anjelique.melendez@oss.qualcomm.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/qcom/qcom-spmi-temp-alarm.c