Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.75 Removed upstream: bcm27xx/patches-6.12/950-0225-media-i2c-ov5647-Correct-pixel-array-offset.patch[1] bcm27xx/patches-6.12/950-0226-media-i2c-ov5647-Correct-minimum-VBLANK-value.patch[2] bcm27xx/patches-6.12/950-0248-media-i2c-ov5647-Sensor-should-report-RAW-color-spac.patch[3] qualcommax/patches-6.12/0074-v6.20-clk-qcom-gcc-ipq5018-flag-sleep-clock-as-critical.patch[4] Manually rebased: bcm27xx/patches-6.12/950-0262-mfd-simple-mfd-i2c-Add-configuration-for-RPi-POE-HAT.patch bcm27xx/patches-6.12/950-0071-drivers-mfd-sensehat-Add-Raspberry-Pi-Sense-HAT-to-s.patch bcm27xx/patches-6.12/950-0516-media-i2c-ov5647-Add-V4L2_CID_LINK_FREQUENCY-control.patch lantiq/patches-6.12/101-find_active_root.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=58f1767ad5c9eda3dd0befddc1843259d46d64fa 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=ff65571ffae52b65577121e7696bf22156e1928a 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=fbf2a108ed5eb1c896d3f354bd05314c2e22e78f 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=b109dd4970a0fc89d54b1198b163f86125dd2977 Build system: x86/64 Build-tested: flogic/glinet_gl-mt6000 Run-tested: flogic/glinet_gl-mt6000 Co-authored-by: Shiji Yang <yangshiji66@outlook.com> Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/22276 Signed-off-by: Robert Marko <robimarko@gmail.com>
75 lines
2.3 KiB
Diff
75 lines
2.3 KiB
Diff
From fd8318a32573d73eb20637a0c80689de0dc98169 Mon Sep 17 00:00:00 2001
|
|
From: Peng Fan <peng.fan@nxp.com>
|
|
Date: Fri, 3 Jan 2025 16:41:13 +0800
|
|
Subject: [PATCH] PM: sleep: wakeirq: Introduce device-managed variant of
|
|
dev_pm_set_wake_irq()
|
|
|
|
Add device-managed variant of dev_pm_set_wake_irq which automatically
|
|
clear the wake irq on device destruction to simplify error handling
|
|
and resource management in drivers.
|
|
|
|
Signed-off-by: Peng Fan <peng.fan@nxp.com>
|
|
Link: https://patch.msgid.link/20250103-wake_irq-v2-1-e3aeff5e9966@nxp.com
|
|
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
|
---
|
|
drivers/base/power/wakeirq.c | 26 ++++++++++++++++++++++++++
|
|
include/linux/pm_wakeirq.h | 6 ++++++
|
|
2 files changed, 32 insertions(+)
|
|
|
|
--- a/drivers/base/power/wakeirq.c
|
|
+++ b/drivers/base/power/wakeirq.c
|
|
@@ -106,6 +106,32 @@ void dev_pm_clear_wake_irq(struct device
|
|
}
|
|
EXPORT_SYMBOL_GPL(dev_pm_clear_wake_irq);
|
|
|
|
+static void devm_pm_clear_wake_irq(void *dev)
|
|
+{
|
|
+ dev_pm_clear_wake_irq(dev);
|
|
+}
|
|
+
|
|
+/**
|
|
+ * devm_pm_set_wake_irq - device-managed variant of dev_pm_set_wake_irq
|
|
+ * @dev: Device entry
|
|
+ * @irq: Device IO interrupt
|
|
+ *
|
|
+ *
|
|
+ * Attach a device IO interrupt as a wake IRQ, same with dev_pm_set_wake_irq,
|
|
+ * but the device will be auto clear wake capability on driver detach.
|
|
+ */
|
|
+int devm_pm_set_wake_irq(struct device *dev, int irq)
|
|
+{
|
|
+ int ret;
|
|
+
|
|
+ ret = dev_pm_set_wake_irq(dev, irq);
|
|
+ if (ret)
|
|
+ return ret;
|
|
+
|
|
+ return devm_add_action_or_reset(dev, devm_pm_clear_wake_irq, dev);
|
|
+}
|
|
+EXPORT_SYMBOL_GPL(devm_pm_set_wake_irq);
|
|
+
|
|
/**
|
|
* handle_threaded_wake_irq - Handler for dedicated wake-up interrupts
|
|
* @irq: Device specific dedicated wake-up interrupt
|
|
--- a/include/linux/pm_wakeirq.h
|
|
+++ b/include/linux/pm_wakeirq.h
|
|
@@ -10,6 +10,7 @@ extern int dev_pm_set_wake_irq(struct de
|
|
extern int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq);
|
|
extern int dev_pm_set_dedicated_wake_irq_reverse(struct device *dev, int irq);
|
|
extern void dev_pm_clear_wake_irq(struct device *dev);
|
|
+extern int devm_pm_set_wake_irq(struct device *dev, int irq);
|
|
|
|
#else /* !CONFIG_PM */
|
|
|
|
@@ -32,5 +33,10 @@ static inline void dev_pm_clear_wake_irq
|
|
{
|
|
}
|
|
|
|
+static inline int devm_pm_set_wake_irq(struct device *dev, int irq)
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
+
|
|
#endif /* CONFIG_PM */
|
|
#endif /* _LINUX_PM_WAKEIRQ_H */
|