mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 17:01:14 +00:00
a47279154e
Manually rebased patches: bcm27xx: patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch bcm53xx: patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch layerscape: patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch patches-5.4/808-i2c-0002-MLK-10893-i2c-imx-add-irqf_no_suspend.patch patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch Removed since could be reverse-applied by quilt: mediatek: patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch All modifications made by update_kernel.sh Build system: x86_64 Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711, x86_64 Run-tested: ipq806x/R7800, x86_64 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us> Tested-by: Curtis Deptuck <curtdept@me.com> [x86_64] Rebase of 802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
53 lines
1.5 KiB
Diff
53 lines
1.5 KiB
Diff
From 211c20a459a0fd4868ed22ecfc2b2186d9df6da0 Mon Sep 17 00:00:00 2001
|
|
From: Joakim Zhang <qiangqing.zhang@nxp.com>
|
|
Date: Tue, 30 Jul 2019 14:43:25 +0800
|
|
Subject: [PATCH] can: flexcan: add LPSR mode support for i.MX7D
|
|
|
|
For i.MX7D LPSR mode, the controller will lost power and got the
|
|
configuration state lost after system resume back.
|
|
So we need to set pinctrl state again and re-start chip to do
|
|
re-configuration after resume.
|
|
|
|
For wakeup case, it should not set pinctrl to sleep state by
|
|
pinctrl_pm_select_sleep_state.
|
|
For interface is not up before suspend case, we don't need
|
|
re-configure as it will be configured by user later by interface up.
|
|
|
|
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
|
---
|
|
drivers/net/can/flexcan.c | 21 ++++++++++++++-------
|
|
1 file changed, 14 insertions(+), 7 deletions(-)
|
|
|
|
--- a/drivers/net/can/flexcan.c
|
|
+++ b/drivers/net/can/flexcan.c
|
|
@@ -26,6 +26,7 @@
|
|
#include <linux/platform_device.h>
|
|
#include <linux/pm_runtime.h>
|
|
#include <linux/regulator/consumer.h>
|
|
+#include <linux/pinctrl/consumer.h>
|
|
#include <linux/regmap.h>
|
|
|
|
#define DRV_NAME "flexcan"
|
|
@@ -1954,9 +1955,7 @@ static int __maybe_unused flexcan_suspen
|
|
if (err)
|
|
return err;
|
|
} else {
|
|
- err = flexcan_chip_disable(priv);
|
|
- if (err)
|
|
- return err;
|
|
+ flexcan_chip_stop(dev);
|
|
}
|
|
netif_stop_queue(dev);
|
|
netif_device_detach(dev);
|
|
@@ -1982,7 +1981,9 @@ static int __maybe_unused flexcan_resume
|
|
if (err)
|
|
return err;
|
|
} else {
|
|
- err = flexcan_chip_enable(priv);
|
|
+ err = flexcan_chip_start(dev);
|
|
+ if (err)
|
|
+ return err;
|
|
}
|
|
}
|
|
|