]> git.baikalelectronics.ru Git - kernel.git/commit
can: flexcan: fix resume function
authorFabio Estevam <fabio.estevam@nxp.com>
Wed, 17 Aug 2016 15:41:08 +0000 (12:41 -0300)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 19 Sep 2016 14:09:05 +0000 (16:09 +0200)
commit493233be468109122f6e327a046bcd1d2cd6da16
treea3aa347dd8ba7d7db01a4f19405b32657f6d6f10
parent66e73c223264ba6f2aeb1ec27810933086a282e4
can: flexcan: fix resume function

On a imx6ul-pico board the following error is seen during system suspend:

dpm_run_callback(): platform_pm_resume+0x0/0x54 returns -110
PM: Device 2090000.flexcan failed to resume: error -110

The reason for this suspend error is because when the CAN interface is not
active the clocks are disabled and then flexcan_chip_enable() will
always fail due to a timeout error.

In order to fix this issue, only call flexcan_chip_enable/disable()
when the CAN interface is active.

Based on a patch from Dong Aisheng in the NXP kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c