can: flexcan: add low power enter/exit acknowledgment helper
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Wed, 4 Dec 2019 11:36:11 +0000 (11:36 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 8 Dec 2019 10:52:02 +0000 (11:52 +0100)
commitb7603d080ffcf8689ec91ca300caf84d8dbed317
treeee96d615a5e33aa2b877f2aa2d5456ca06e821d5
parente707180ae2df1c87e26ec7a6fd70d07483bde7fd
can: flexcan: add low power enter/exit acknowledgment helper

The MCR[LPMACK] read-only bit indicates that FlexCAN is in a lower-power
mode (Disabled mode, Doze mode, Stop mode).

The CPU can poll this bit to know when FlexCAN has actually entered low
power mode. The low power enter/exit acknowledgment helper will reduce
code duplication for disabled mode, doze mode and stop mode.

Tested-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c