diff options
Diffstat (limited to 'drivers/net/wwan/t7xx/t7xx_pci.h')
-rw-r--r-- | drivers/net/wwan/t7xx/t7xx_pci.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wwan/t7xx/t7xx_pci.h b/drivers/net/wwan/t7xx/t7xx_pci.h index f51fc5a1301f..50b37056ce5a 100644 --- a/drivers/net/wwan/t7xx/t7xx_pci.h +++ b/drivers/net/wwan/t7xx/t7xx_pci.h @@ -21,6 +21,7 @@ #include <linux/irqreturn.h> #include <linux/mutex.h> #include <linux/pci.h> +#include <linux/spinlock.h> #include <linux/types.h> #include "t7xx_reg.h" @@ -55,6 +56,9 @@ typedef irqreturn_t (*t7xx_intr_callback)(int irq, void *param); * @md_pm_entity_mtx: protects md_pm_entities list * @pm_sr_ack: ack from the device when went to sleep or woke up * @md_pm_state: state for resume/suspend + * @md_pm_lock: protects PCIe sleep lock + * @sleep_disable_count: PCIe L1.2 lock counter + * @sleep_lock_acquire: indicates that sleep has been disabled */ struct t7xx_pci_dev { t7xx_intr_callback intr_handler[EXT_INT_NUM]; @@ -71,6 +75,9 @@ struct t7xx_pci_dev { struct mutex md_pm_entity_mtx; /* Protects MD PM entities list */ struct completion pm_sr_ack; atomic_t md_pm_state; + spinlock_t md_pm_lock; /* Protects PCI resource lock */ + unsigned int sleep_disable_count; + struct completion sleep_lock_acquire; }; enum t7xx_pm_id { @@ -102,6 +109,9 @@ struct md_pm_entity { void *entity_param; }; +void t7xx_pci_disable_sleep(struct t7xx_pci_dev *t7xx_dev); +void t7xx_pci_enable_sleep(struct t7xx_pci_dev *t7xx_dev); +int t7xx_pci_sleep_disable_complete(struct t7xx_pci_dev *t7xx_dev); int t7xx_pci_pm_entity_register(struct t7xx_pci_dev *t7xx_dev, struct md_pm_entity *pm_entity); int t7xx_pci_pm_entity_unregister(struct t7xx_pci_dev *t7xx_dev, struct md_pm_entity *pm_entity); void t7xx_pci_pm_init_late(struct t7xx_pci_dev *t7xx_dev); |