]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccp - use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Wed, 22 Jul 2020 09:30:58 +0000 (15:00 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 31 Jul 2020 08:25:26 +0000 (18:25 +1000)
commitc3207ee54e94c40c27857427af806d4dd1776e98
tree78fd30e013a90238fa38c6c7e4ad0a52ec6dd6ff
parentb0fdaea23b04496386e42dcd2ba31a4b27ba88e4
crypto: ccp - use generic power management

Drivers using legacy power management .suspen()/.resume() callbacks
have to manage PCI states and device's PM states themselves. They also
need to take care of standard configuration registers.

Switch to generic power management framework using a single
"struct dev_pm_ops" variable to take the unnecessary load from the driver.
This also avoids the need for the driver to directly call most of the PCI
helper functions and device power state control functions as through
the generic framework, PCI Core takes care of the necessary operations,
and drivers are required to do only device-specific jobs.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Acked-by: John Allen <john.allen@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-dev.c
drivers/crypto/ccp/sp-dev.c
drivers/crypto/ccp/sp-dev.h
drivers/crypto/ccp/sp-pci.c
drivers/crypto/ccp/sp-platform.c