]> git.baikalelectronics.ru Git - kernel.git/commit
can: flexcan: implement can Runtime PM
authorAisheng Dong <aisheng.dong@nxp.com>
Fri, 30 Nov 2018 08:53:26 +0000 (08:53 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 24 Jul 2019 08:31:55 +0000 (10:31 +0200)
commitdf1613fa55c7a49abbd39f906a39b2e406268eff
tree024c445b7d8ba973154b704380b014b02e5ed26e
parent52c804476253c5da7310f8139ca0b2ae19139e48
can: flexcan: implement can Runtime PM

Flexcan will be disabled during suspend if no wakeup function required and
enabled after resume accordingly. During this period, we could explicitly
disable clocks.
Since PM is optional, the clock is enabled at probe to guarante the
clock is running when PM is not enabled in the kernel.

Implement Runtime PM which will:
1) Without CONFIG_PM, clock is running whether Flexcan up or down.
2) With CONFIG_PM, clock enabled while Flexcan up and disabled when
   Flexcan down.
3) Disable clock when do system suspend and enable clock while system
   resume.
4) Make Power Domain framework be able to shutdown the corresponding
   power domain of this device.

Signed-off-by: Aisheng Dong <aisheng.dong@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c