]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: eg20t: use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Wed, 5 Aug 2020 19:36:16 +0000 (01:06 +0530)
committerWolfram Sang <wsa@kernel.org>
Mon, 10 Aug 2020 13:47:38 +0000 (15:47 +0200)
commit4b8881957c7c11326d687d053047884dda294f71
tree820f45f0bd1790fe9dccb20ab2cdbbcf2f86ffc1
parent38e932677b5607cc6ab89c411935e30fe66fcb42
i2c: eg20t: 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>
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-eg20t.c