]> 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)
commit71a5b67c85966f1fe22cc1dd6133e62db756b805
tree820f45f0bd1790fe9dccb20ab2cdbbcf2f86ffc1
parent17f3c9d2fee7620a065c4cc0f7d0198ce39f34c3
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