net: wwan: t7xx: Introduce power management
authorHaijun Liu <haijun.liu@mediatek.com>
Fri, 6 May 2022 18:13:07 +0000 (11:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 May 2022 09:51:59 +0000 (10:51 +0100)
commit46e8f49ed7b3063f51e28f3ea2084b3da29c1503
tree6b6f626ab66085c3ef91cb4121c1e0060fe2fe34
parent05d19bf500f8281f574713479b04679fa226d0a3
net: wwan: t7xx: Introduce power management

Implements suspend, resumes, freeze, thaw, poweroff, and restore
`dev_pm_ops` callbacks.

From the host point of view, the t7xx driver is one entity. But, the
device has several modules that need to be addressed in different ways
during power management (PM) flows.
The driver uses the term 'PM entities' to refer to the 2 DPMA and
2 CLDMA HW blocks that need to be managed during PM flows.
When a dev_pm_ops function is called, the PM entities list is iterated
and the matching function is called for each entry in the list.

Signed-off-by: Haijun Liu <haijun.liu@mediatek.com>
Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
Co-developed-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>
Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wwan/t7xx/t7xx_hif_cldma.c
drivers/net/wwan/t7xx/t7xx_hif_cldma.h
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.h
drivers/net/wwan/t7xx/t7xx_mhccif.c
drivers/net/wwan/t7xx/t7xx_pci.c
drivers/net/wwan/t7xx/t7xx_pci.h
drivers/net/wwan/t7xx/t7xx_state_monitor.c