mirror of
https://github.com/armbian/build.git
synced 2025-09-19 04:31:38 +02:00
I have changed the way the patches are generated a bit. Instead of using orange-pi branch from megous tree for 6.6 kernel, I have used the following kernel branches a83t-suspend, af8133j, anx, audio, axp, cam, drm, err, fixes, mbus, modem, opi3, pb, pinetab, pp, ppkb, samuel, speed, tbs-a711, ths These branches were carefully chosen to include only allwinner related patches and remove importing of the rockchip related patches into the allwinner kernel. Following patches are modified to fix patch application failure - patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-reg_usb1_vbus-status-ok.patch - patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-Enable-GPU-mali.patch - patches.armbian/arm64-dts-allwinner-h616-Add-efuse_xlate-cpu-frequency-scaling-v1_6_2.patch - patches.armbian/arm64-dts-allwinner-h616-LED-green_power_on-red_status_heartbeat.patch - patches.armbian/arm64-dts-allwinner-overlay-Add-Overlays-for-sunxi64.patch - patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch Following patches are modified because of kernel api change to fix compilation failure - patches.armbian/drv-gpu-drm-sun4i-Add-HDMI-audio-sun4i-hdmi-encoder.patch - patches.armbian/drv-of-Device-Tree-Overlay-ConfigFS-interface.patch
70 lines
2.0 KiB
Diff
70 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Holland <samuel@sholland.org>
|
|
Date: Sat, 2 Jan 2021 15:52:27 -0600
|
|
Subject: rtc: sun6i: Allow RTC wakeup after shutdown
|
|
|
|
Only IRQs that have enable_irq_wake() called on them can wake the system
|
|
from sleep or after it has been shut down. Currently, the RTC alarm can
|
|
only wake the system from sleep. Run the suspend callback to arm the IRQ
|
|
during the shutdown process, so the RTC alarm also works after shutdown.
|
|
|
|
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
|
---
|
|
drivers/rtc/rtc-sun6i.c | 12 +++++++++-
|
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c
|
|
index 8e0c66906103..02129ea346c1 100644
|
|
--- a/drivers/rtc/rtc-sun6i.c
|
|
+++ b/drivers/rtc/rtc-sun6i.c
|
|
@@ -709,6 +709,7 @@ static struct nvmem_config sun6i_rtc_nvmem_cfg = {
|
|
};
|
|
|
|
#ifdef CONFIG_PM_SLEEP
|
|
+
|
|
/* Enable IRQ wake on suspend, to wake up from RTC. */
|
|
static int sun6i_rtc_suspend(struct device *dev)
|
|
{
|
|
@@ -721,7 +722,7 @@ static int sun6i_rtc_suspend(struct device *dev)
|
|
}
|
|
|
|
/* Disable IRQ wake on resume. */
|
|
-static int sun6i_rtc_resume(struct device *dev)
|
|
+static int __maybe_unused sun6i_rtc_resume(struct device *dev)
|
|
{
|
|
struct sun6i_rtc_dev *chip = dev_get_drvdata(dev);
|
|
|
|
@@ -730,6 +731,7 @@ static int sun6i_rtc_resume(struct device *dev)
|
|
|
|
return 0;
|
|
}
|
|
+
|
|
#endif
|
|
|
|
static SIMPLE_DEV_PM_OPS(sun6i_rtc_pm_ops,
|
|
@@ -849,6 +851,13 @@ static int sun6i_rtc_probe(struct platform_device *pdev)
|
|
return 0;
|
|
}
|
|
|
|
+static void sun6i_rtc_shutdown(struct platform_device *pdev)
|
|
+{
|
|
+#ifdef CONFIG_PM_SLEEP
|
|
+ sun6i_rtc_suspend(&pdev->dev);
|
|
+#endif
|
|
+}
|
|
+
|
|
/*
|
|
* As far as RTC functionality goes, all models are the same. The
|
|
* datasheets claim that different models have different number of
|
|
@@ -873,6 +882,7 @@ MODULE_DEVICE_TABLE(of, sun6i_rtc_dt_ids);
|
|
|
|
static struct platform_driver sun6i_rtc_driver = {
|
|
.probe = sun6i_rtc_probe,
|
|
+ .shutdown = sun6i_rtc_shutdown,
|
|
.driver = {
|
|
.name = "sun6i-rtc",
|
|
.of_match_table = sun6i_rtc_dt_ids,
|
|
--
|
|
Armbian
|
|
|