cnss2: Add code changes to support thermal mitigation
Add cnss2 code changes to register with thermal framework to support thermal mitigation. Change-Id: I9d427603bfc7e6bb5d732fa3e29ff66c965e153b CRs-Fixed: 3386762
This commit is contained in:

committed by
Madan Koyyalamudi

parent
8e0ff47179
commit
6c09e62157
19
cnss2/pci.c
19
cnss2/pci.c
@@ -2474,6 +2474,25 @@ static void cnss_pci_stop_time_sync_update(struct cnss_pci_data *pci_priv)
|
||||
cancel_delayed_work_sync(&pci_priv->time_sync_work);
|
||||
}
|
||||
|
||||
int cnss_pci_set_therm_cdev_state(struct cnss_pci_data *pci_priv,
|
||||
unsigned long thermal_state,
|
||||
int tcdev_id)
|
||||
{
|
||||
if (!pci_priv) {
|
||||
cnss_pr_err("pci_priv is NULL!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!pci_priv->driver_ops || !pci_priv->driver_ops->set_therm_cdev_state) {
|
||||
cnss_pr_err("driver_ops or set_therm_cdev_state is NULL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return pci_priv->driver_ops->set_therm_cdev_state(pci_priv->pci_dev,
|
||||
thermal_state,
|
||||
tcdev_id);
|
||||
}
|
||||
|
||||
int cnss_pci_update_time_sync_period(struct cnss_pci_data *pci_priv,
|
||||
unsigned int time_sync_period)
|
||||
{
|
||||
|
Reference in New Issue
Block a user