mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
thermal/drivers/qcom/tsens: Disable wakeup interrupt setup on automotive targets
Add a no_irq_wake flag to struct tsens_plat_data to allow platforms to control whether TSENS interrupts should be configured as wakeup sources. Create a new data_automotive structure and add compatible strings for automotive TSENS variants (SA8775P, SA8255P) with wakeup interrupts disabled. Automotive platforms can enter a low-power parking suspend state where the application processors and thermal mitigation paths are not active. In this state, waking the system due to TSENS threshold interrupts does not enable useful thermal action, but it does repeatedly break suspend residency and increase battery drain. Allow these automotive variants to keep TSENS monitoring enabled during normal runtime while opting out of TSENS wakeup interrupts during suspend, so the system can remain in low power until ignition/resume. Signed-off-by: Priyansh Jain <priyansh.jain@oss.qualcomm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org> Link: https://patch.msgid.link/20260601-tsens_interrupt_wake_control-v2-2-ce9570946abd@oss.qualcomm.com
This commit is contained in:
parent
c665de5eeb
commit
968098b4ca
|
|
@ -306,3 +306,11 @@ struct tsens_plat_data data_8996 = {
|
|||
.feat = &tsens_v2_feat,
|
||||
.fields = tsens_v2_regfields,
|
||||
};
|
||||
|
||||
/* Do not enable wakeup capable interrupts for automotive platforms */
|
||||
struct tsens_plat_data data_automotive_v2 = {
|
||||
.ops = &ops_generic_v2,
|
||||
.feat = &tsens_v2_feat,
|
||||
.fields = tsens_v2_regfields,
|
||||
.no_irq_wake = true,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1212,6 +1212,12 @@ static const struct of_device_id tsens_table[] = {
|
|||
}, {
|
||||
.compatible = "qcom,tsens-v2",
|
||||
.data = &data_tsens_v2,
|
||||
}, {
|
||||
.compatible = "qcom,sa8775p-tsens",
|
||||
.data = &data_automotive_v2,
|
||||
}, {
|
||||
.compatible = "qcom,sa8255p-tsens",
|
||||
.data = &data_automotive_v2,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
|
@ -1424,7 +1430,7 @@ static int tsens_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
|
||||
device_init_wakeup(dev, true);
|
||||
device_init_wakeup(dev, !data->no_irq_wake);
|
||||
|
||||
if (!priv->ops || !priv->ops->init || !priv->ops->get_temp)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -532,6 +532,7 @@ struct tsens_features {
|
|||
* @hw_ids: Subset of sensors ids supported by platform, if not the first n
|
||||
* @feat: features of the IP
|
||||
* @fields: bitfield locations
|
||||
* @no_irq_wake: if set, TSENS interrupts will not be configured as wakeup sources
|
||||
*/
|
||||
struct tsens_plat_data {
|
||||
const u32 num_sensors;
|
||||
|
|
@ -539,6 +540,7 @@ struct tsens_plat_data {
|
|||
unsigned int *hw_ids;
|
||||
struct tsens_features *feat;
|
||||
const struct reg_field *fields;
|
||||
bool no_irq_wake;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -676,4 +678,7 @@ extern const struct tsens_plat_data data_ipq5018;
|
|||
extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2;
|
||||
extern const struct tsens_plat_data data_ipq5332, data_ipq5424;
|
||||
|
||||
/* TSENS automotive targets */
|
||||
extern struct tsens_plat_data data_automotive_v2;
|
||||
|
||||
#endif /* __QCOM_TSENS_H__ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user