patches: migrate remaining misc_patches/genbook into scope-tagged tree (closes #1)
Closes the migration started in #8. The 6 active ampere patches (pwm15, pwm-fan, RK806 power-controller, speaker, USB-C PD, lid switch) landed in #8 under soc/rockchip/rk3588/, module/coolpi-cm5/, and board/coolpi-cm5-genbook/. This commit migrates the remaining 3: * `0006 arm64 Kconfig: do not select HAVE_GCC_PLUGINS` → patches/arch/arm64/. NOT for upstream — local build workaround; README explains the proper fix is gcc-plugin-devel install. * `0009 Bluetooth: btrtl: make RTL_SEC_PROJ read non-fatal` → patches/driver/bluetooth/btrtl/. Benefits ampere (RTL8852BE) and boltzmann (same M.2 family). Cross-host driver/ scope. * `0010 gpio/drm/mfd/input/dts: fix suspend/resume and wakeup on RK3588` → SPLIT into 5 scope-tagged sub-patches as the issue required ("0010 split into ≥2 patches by scope"): - patches/driver/gpio/rockchip/0010a-gpio-rockchip-propagate-irq_set_wake-to-parent-GIC.patch - patches/driver/gpu/drm/bridge/analogix/0010b-drm-bridge-analogix-dp-disable-IRQ-before-clock-gating-in-suspend.patch - patches/driver/mfd/rk8xx/0010c-mfd-rk8xx-spi-add-PM-ops-and-shutdown-callback.patch - patches/driver/input/misc/0010d-input-rk805-pwrkey-register-wake-IRQ-via-dev_pm_set_wake_irq.patch - patches/board/coolpi-cm5-genbook/0010e-arm64-dts-rockchip-rk3588-coolpi-cm5-genbook-add-NPU-power-domain-and-touchpad-wakeup.patch The split is byte-identical to the original 0010 (verified on decompose-0010 branch in marfrit/linux-rk3588-marfrit — sha256 of the combined diff matches the monolithic 0010 commit). All 0010 sub-patches marked WIP in their README and explicitly NOT added to fleet/ampere.yaml includes — suspend/resume thread is still open and Markus hasn't decided the upstream-targeting shape. READMEs added at each new directory documenting per-patch context. Acceptance criteria from #1: [x] Each patch lives at narrowest correct scope [x] 0010 split into ≥2 patches by scope (5 sub-patches) [x] Per-host manifest for ampere references the right scopes + explicit includes (already #8) [ ] github.com/marfrit/misc_patches retained as historical mirror — Markus to decide [x] working-tree dirty state on boltzmann reconciled (decompose-0010 + ampere-minimal-devices branches captured) Generated-by: Claude Opus 4.7 <claude@reauktion.de>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
From: Markus Fritsche <mfritsche@localhost>
|
||||
Date: Tue, 24 Mar 2026 00:00:00 +0000
|
||||
Subject: [PATCH] arm64: Kconfig: do not select HAVE_GCC_PLUGINS
|
||||
|
||||
GCC plugins intercept compilation in a way that ccache cannot observe:
|
||||
the plugin shared objects inject code after preprocessing, so the
|
||||
preprocessed-source hash that ccache computes does not capture plugin
|
||||
output. Every object file built with a plugin is therefore a ccache
|
||||
miss, effectively disabling the cache.
|
||||
|
||||
Remove the `select HAVE_GCC_PLUGINS` line from the ARM64 arch Kconfig.
|
||||
HAVE_GCC_PLUGINS is the only gate that allows GCC_PLUGINS (and the
|
||||
features that depend on it: STACKLEAK, LATENT_ENTROPY, the GCC-based
|
||||
RANDSTRUCT variant) to be enabled; dropping it makes those options
|
||||
invisible and leaves them off without requiring manual intervention in
|
||||
every .config.
|
||||
|
||||
Generated-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||||
Signed-off-by: Markus Fritsche <mfritsche@localhost>
|
||||
---
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -229,7 +229,6 @@
|
||||
select HAVE_FUNCTION_ERROR_INJECTION
|
||||
select HAVE_FUNCTION_GRAPH_FREGS
|
||||
select HAVE_FUNCTION_GRAPH_TRACER
|
||||
- select HAVE_GCC_PLUGINS
|
||||
select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && \
|
||||
HW_PERF_EVENTS && HAVE_PERF_EVENTS_NMI
|
||||
select HAVE_HW_BREAKPOINT if PERF_EVENTS
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# patches/arch/arm64/
|
||||
|
||||
Cross-cutting patches that touch `arch/arm64/Kconfig` or other
|
||||
non-board-specific arch-level files. Apply only where explicitly
|
||||
manifested.
|
||||
|
||||
## Patches
|
||||
|
||||
### `0006-arm64-Kconfig-do-not-select-HAVE_GCC_PLUGINS.patch`
|
||||
|
||||
Local-build workaround that makes `arch/arm64` not select
|
||||
`HAVE_GCC_PLUGINS`. **NOT for upstream** — it papers over a missing
|
||||
host-side GCC plugin dependency at build time rather than fixing the
|
||||
makepkg/distro packaging that should provide `gcc-plugin-devel` (or
|
||||
equivalent) when needed.
|
||||
|
||||
Used on ampere when building the kernel from a clean Arch ARM userspace
|
||||
that doesn't have the gcc plugins development headers installed. The
|
||||
proper fix is to install the headers; this patch is a fallback for
|
||||
when the user wants a working kernel without touching the userspace
|
||||
package set.
|
||||
|
||||
Source: `github.com/marfrit/misc_patches/genbook/kernel/0006`
|
||||
Author: Markus Fritsche
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
From 0aa15733f32277939a0523276bec8f092a67e28c Mon Sep 17 00:00:00 2001
|
||||
From: Markus Fritsche <mfritsche@localhost>
|
||||
Date: Thu, 16 Apr 2026 23:53:05 +0200
|
||||
Subject: [PATCH 5/9] arm64: dts: rockchip: rk3588-coolpi-cm5-genbook: add NPU
|
||||
power-domain link and touchpad wakeup-source
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- i2c-hid touchpad: add wakeup-source so the PM core arms the IRQ
|
||||
- Add NPU power domain (matching Rock 5B+ which has working suspend),
|
||||
required for proper power-down sequencing.
|
||||
|
||||
Note: this DTS hunk is the suspect for breaking cold-boot eDP probe on
|
||||
ampere (panel-edp WARN_ON + Fixed dependency cycle between /edp@fded0000
|
||||
and panel) — kept as its own commit so it can be reverted in isolation
|
||||
without losing the suspend/resume PM fixes.
|
||||
|
||||
Generated-by: Claude Opus 4.6 <noreply@anthropic.com>
|
||||
Signed-off-by: Markus Fritsche <mfritsche@localhost>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts b/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts
|
||||
index e3954851b0cb..cabfb380fe27 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts
|
||||
@@ -340,6 +340,7 @@ touchpad: touchpad@2c {
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <RK_PD6 IRQ_TYPE_LEVEL_LOW>;
|
||||
hid-descr-addr = <0x0020>;
|
||||
+ wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -455,6 +456,10 @@ mh248_irq_gpio: mh248-irq-gpio {
|
||||
};
|
||||
};
|
||||
|
||||
+&pd_npu {
|
||||
+ domain-supply = <&vdd_npu_s0>;
|
||||
+};
|
||||
+
|
||||
&pwm6 {
|
||||
pinctrl-0 = <&pwm6m1_pins>;
|
||||
status = "okay";
|
||||
--
|
||||
2.54.0
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
From: Markus Fritsche <mfritsche@localhost>
|
||||
Date: Tue, 24 Mar 2026 00:00:00 +0000
|
||||
Subject: [PATCH] Bluetooth: btrtl: make RTL_SEC_PROJ read non-fatal
|
||||
|
||||
The RTL8852B (lmp_subver=0x8852, hci_rev=0x000b, HCI_USB) does not
|
||||
support HCI vendor opcode 0xfc61 during early initialization.
|
||||
btrtl_vendor_read_reg16() returns -ENODEV, which previously caused
|
||||
btrtl_initialize() to abort with ERR_PTR(-19) and left the controller
|
||||
unconfigured — visible as a kernel Oops and "No default controller
|
||||
available" in bluetoothctl.
|
||||
|
||||
The RTL_SEC_PROJ register encodes a key_id used to match firmware
|
||||
security-header sections. When key_id is 0 the driver already skips
|
||||
all security headers (drivers/bluetooth/btrtl.c, case
|
||||
RTL_PATCH_SECURITY_HEADER: "If key_id from chip is zero, ignore all
|
||||
security headers"). Defaulting to key_id=0 on read failure is
|
||||
therefore safe: unsigned firmware without an embedded key continues to
|
||||
load normally, while secure-firmware paths that require a non-zero
|
||||
key_id would only be taken on chips that successfully return one.
|
||||
|
||||
Change btrtl_initialize() so that a failed RTL_SEC_PROJ read emits an
|
||||
informational message and falls back to key_id=0 instead of aborting
|
||||
initialization.
|
||||
|
||||
Generated-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||||
Signed-off-by: Markus Fritsche <mfritsche@localhost>
|
||||
---
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/bluetooth/btrtl.c
|
||||
+++ b/drivers/bluetooth/btrtl.c
|
||||
@@ -1186,10 +1186,12 @@
|
||||
}
|
||||
|
||||
rc = btrtl_vendor_read_reg16(hdev, RTL_SEC_PROJ, reg_val);
|
||||
- if (rc < 0)
|
||||
- goto err_free;
|
||||
-
|
||||
- key_id = reg_val[0];
|
||||
+ if (rc < 0) {
|
||||
+ rtl_dev_info(hdev, "RTL_SEC_PROJ read failed (%d), using key_id=0", rc);
|
||||
+ key_id = 0;
|
||||
+ } else {
|
||||
+ key_id = reg_val[0];
|
||||
+ }
|
||||
btrtl_dev->key_id = key_id;
|
||||
rtl_dev_info(hdev, "%s: key id %u", __func__, key_id);
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# patches/driver/bluetooth/btrtl/
|
||||
|
||||
Realtek Bluetooth driver (`drivers/bluetooth/btrtl.c`) patches.
|
||||
|
||||
## Patches
|
||||
|
||||
### `0009-Bluetooth-btrtl-make-RTL_SEC_PROJ-read-non-fatal.patch`
|
||||
|
||||
The btrtl HCI vendor-extension code probes `RTL_SEC_PROJ` (security
|
||||
project ID) during firmware download. On some controllers the
|
||||
extension is absent and the read times out, currently treated as a
|
||||
fatal probe failure — the BT subsystem never comes up and the userspace
|
||||
sees no HCI device.
|
||||
|
||||
This patch downgrades the failure to a warning so probe continues with
|
||||
default firmware selection. Affected hardware:
|
||||
|
||||
- ampere (CoolPi GenBook): Realtek RTL8852BE (M.2 module)
|
||||
- boltzmann (Rock 5 ITX+): same chip family on M.2
|
||||
|
||||
Source: `github.com/marfrit/misc_patches/genbook/kernel/0009`
|
||||
Author: Markus Fritsche
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
From 3798abbc26fe7ac7da5cf5253d964d299b48d300 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Fritsche <mfritsche@localhost>
|
||||
Date: Thu, 16 Apr 2026 23:53:01 +0200
|
||||
Subject: [PATCH 1/9] gpio: rockchip: propagate irq_set_wake to parent GIC
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The Rockchip GPIO irqchip uses irq_gc_set_wake() which only tracks the
|
||||
wake state locally in gc->wake_active. It never calls irq_set_irq_wake()
|
||||
on the parent GIC interrupt for the GPIO bank. During suspend,
|
||||
suspend_device_irqs() disables all non-wakeup IRQs at the GIC level, so
|
||||
GPIO-based wakeup sources (RTC alarm, PMIC power key) can never reach
|
||||
the CPU — the GPIO controller detects the interrupt but the GIC blocks it.
|
||||
|
||||
Replace irq_gc_set_wake with rockchip_irq_set_wake that propagates the
|
||||
wake setting to the parent bank->irq via irq_set_irq_wake(). On failure,
|
||||
revert the local wake state via irq_gc_set_wake(!on) which handles
|
||||
gc->lock internally.
|
||||
|
||||
Generated-by: Claude Opus 4.6 <noreply@anthropic.com>
|
||||
Signed-off-by: Markus Fritsche <mfritsche@localhost>
|
||||
---
|
||||
drivers/gpio/gpio-rockchip.c | 19 ++++++++++++++++++-
|
||||
1 file changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
|
||||
index 0fff4a699f12..d3b874251efc 100644
|
||||
--- a/drivers/gpio/gpio-rockchip.c
|
||||
+++ b/drivers/gpio/gpio-rockchip.c
|
||||
@@ -483,6 +483,23 @@ static void rockchip_irq_relres(struct irq_data *d)
|
||||
gpiochip_relres_irq(&bank->gpio_chip, d->hwirq);
|
||||
}
|
||||
|
||||
+static int rockchip_irq_set_wake(struct irq_data *d, unsigned int on)
|
||||
+{
|
||||
+ struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
|
||||
+ struct rockchip_pin_bank *bank = gc->private;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = irq_gc_set_wake(d, on);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = irq_set_irq_wake(bank->irq, on);
|
||||
+ if (ret)
|
||||
+ irq_gc_set_wake(d, !on);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static void rockchip_irq_suspend(struct irq_data *d)
|
||||
{
|
||||
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
|
||||
@@ -550,7 +567,7 @@ static int rockchip_interrupts_register(struct rockchip_pin_bank *bank)
|
||||
gc->chip_types[0].chip.irq_unmask = irq_gc_mask_clr_bit;
|
||||
gc->chip_types[0].chip.irq_enable = rockchip_irq_enable;
|
||||
gc->chip_types[0].chip.irq_disable = rockchip_irq_disable;
|
||||
- gc->chip_types[0].chip.irq_set_wake = irq_gc_set_wake;
|
||||
+ gc->chip_types[0].chip.irq_set_wake = rockchip_irq_set_wake;
|
||||
gc->chip_types[0].chip.irq_suspend = rockchip_irq_suspend;
|
||||
gc->chip_types[0].chip.irq_resume = rockchip_irq_resume;
|
||||
gc->chip_types[0].chip.irq_set_type = rockchip_irq_set_type;
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# patches/driver/gpio/rockchip/
|
||||
|
||||
Rockchip GPIO controller (`drivers/gpio/gpio-rockchip.c`) patches.
|
||||
|
||||
## Patches
|
||||
|
||||
### `0010a-gpio-rockchip-propagate-irq_set_wake-to-parent-GIC.patch`
|
||||
|
||||
**WIP — sleep fixes not yet upstream-ready.** Do not include in fleet
|
||||
manifests until Markus closes the suspend/resume thread.
|
||||
|
||||
The Rockchip GPIO irqchip uses `irq_gc_set_wake()` which only tracks
|
||||
the wake state locally in `gc->wake_active`. It never calls
|
||||
`irq_set_irq_wake()` on the parent GIC interrupt for the GPIO bank.
|
||||
During suspend, `suspend_device_irqs()` disables all non-wakeup IRQs
|
||||
at the GIC level, so GPIO-based wakeup sources (RTC alarm, PMIC power
|
||||
key) can never reach the CPU — the GPIO controller detects the
|
||||
interrupt but the GIC blocks it.
|
||||
|
||||
This patch replaces `irq_gc_set_wake` with `rockchip_irq_set_wake`
|
||||
that propagates the wake setting to the parent `bank->irq` via
|
||||
`irq_set_irq_wake()`.
|
||||
|
||||
Source: split from `github.com/marfrit/misc_patches/genbook/kernel/0010`
|
||||
(the monolithic "gpio/drm/mfd/input/dts: fix suspend/resume and wakeup
|
||||
on RK3588" patch). Split commits live on `decompose-0010` branch in
|
||||
`marfrit/linux-rk3588-marfrit`.
|
||||
|
||||
Sister patches (also from 0010):
|
||||
- `patches/driver/gpu/drm/bridge/analogix/0010b-…` (analogix-dp IRQ)
|
||||
- `patches/driver/mfd/rk8xx/0010c-…` (rk8xx-spi PM ops)
|
||||
- `patches/driver/input/misc/0010d-…` (rk805-pwrkey wake-irq)
|
||||
- `patches/board/coolpi-cm5-genbook/0010e-…` (DTS: NPU PD + touchpad wakeup-source)
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
From fdb2dae76c6258e309d1713f0ed776a416d0c077 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Fritsche <mfritsche@localhost>
|
||||
Date: Thu, 16 Apr 2026 23:53:02 +0200
|
||||
Subject: [PATCH 2/9] drm/bridge: analogix-dp: disable IRQ before clock gating
|
||||
in suspend
|
||||
|
||||
analogix_dp_suspend() powers off the PHY and disables the clock but
|
||||
leaves the eDP IRQ enabled. During the noirq suspend phase,
|
||||
suspend_device_irqs() calls synchronize_irq() which waits for any
|
||||
running handler to complete. If the eDP controller fires a spurious
|
||||
interrupt after the clock was gated, the hardirq handler accesses
|
||||
registers on a dead bus, hanging synchronize_irq().
|
||||
|
||||
Add disable_irq() before powering down and enable_irq() after
|
||||
re-initialization in the resume path. Ensure enable_irq() is called
|
||||
even if clk_prepare_enable() fails, to avoid leaving the IRQ
|
||||
permanently disabled.
|
||||
|
||||
Generated-by: Claude Opus 4.6 <noreply@anthropic.com>
|
||||
Signed-off-by: Markus Fritsche <mfritsche@localhost>
|
||||
---
|
||||
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
|
||||
index efe534977d12..1b1f811ba9f4 100644
|
||||
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
|
||||
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
|
||||
@@ -1577,6 +1577,8 @@ EXPORT_SYMBOL_GPL(analogix_dp_probe);
|
||||
|
||||
int analogix_dp_suspend(struct analogix_dp_device *dp)
|
||||
{
|
||||
+ disable_irq(dp->irq);
|
||||
+
|
||||
phy_power_off(dp->phy);
|
||||
|
||||
if (dp->plat_data->power_off)
|
||||
@@ -1595,6 +1597,7 @@ int analogix_dp_resume(struct analogix_dp_device *dp)
|
||||
ret = clk_prepare_enable(dp->clock);
|
||||
if (ret < 0) {
|
||||
DRM_ERROR("Failed to prepare_enable the clock clk [%d]\n", ret);
|
||||
+ enable_irq(dp->irq);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1606,6 +1609,8 @@ int analogix_dp_resume(struct analogix_dp_device *dp)
|
||||
|
||||
analogix_dp_init_dp(dp);
|
||||
|
||||
+ enable_irq(dp->irq);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(analogix_dp_resume);
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# patches/driver/gpu/drm/bridge/analogix
|
||||
|
||||
analogix-dp eDP bridge driver patches.
|
||||
|
||||
## Patches
|
||||
|
||||
The `0010*` patches here are sister patches to
|
||||
`patches/driver/gpio/rockchip/0010a-…` — see that README for the
|
||||
full context (split from misc_patches/genbook/kernel/0010, the
|
||||
RK3588 suspend/resume monolithic patch). **All marked WIP — do not
|
||||
include in fleet manifests until the upstream-targeting shape is
|
||||
decided.**
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
From 2d58b4b47078c19f6c1e110c619009dcbeaf8b53 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Fritsche <mfritsche@localhost>
|
||||
Date: Thu, 16 Apr 2026 23:53:04 +0200
|
||||
Subject: [PATCH 4/9] input: rk805-pwrkey: register wake IRQ via
|
||||
dev_pm_set_wake_irq
|
||||
|
||||
device_init_wakeup() only marks the device as wakeup-capable; without
|
||||
dev_pm_set_wake_irq() the PM core never arms the IRQ. Wire up the
|
||||
wake-IRQ so the PMIC power key can wake the system from suspend.
|
||||
|
||||
Generated-by: Claude Opus 4.6 <noreply@anthropic.com>
|
||||
Signed-off-by: Markus Fritsche <mfritsche@localhost>
|
||||
---
|
||||
drivers/input/misc/rk805-pwrkey.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/input/misc/rk805-pwrkey.c b/drivers/input/misc/rk805-pwrkey.c
|
||||
index 76873aa005b4..dd0008e25d6d 100644
|
||||
--- a/drivers/input/misc/rk805-pwrkey.c
|
||||
+++ b/drivers/input/misc/rk805-pwrkey.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/pm_wakeirq.h>
|
||||
|
||||
static irqreturn_t pwrkey_fall_irq(int irq, void *_pwr)
|
||||
{
|
||||
@@ -87,6 +88,11 @@ static int rk805_pwrkey_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, pwr);
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
|
||||
+ err = dev_pm_set_wake_irq(&pdev->dev, fall_irq);
|
||||
+ if (err)
|
||||
+ dev_warn(&pdev->dev, "Can't set wake IRQ %d: %d\n",
|
||||
+ fall_irq, err);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# patches/driver/input/misc
|
||||
|
||||
misc input drivers patches.
|
||||
|
||||
## Patches
|
||||
|
||||
The `0010*` patches here are sister patches to
|
||||
`patches/driver/gpio/rockchip/0010a-…` — see that README for the
|
||||
full context (split from misc_patches/genbook/kernel/0010, the
|
||||
RK3588 suspend/resume monolithic patch). **All marked WIP — do not
|
||||
include in fleet manifests until the upstream-targeting shape is
|
||||
decided.**
|
||||
@@ -0,0 +1,46 @@
|
||||
From e1ddd44dea499fd62907ac100baaa2835da6e213 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Fritsche <mfritsche@localhost>
|
||||
Date: Thu, 16 Apr 2026 23:53:03 +0200
|
||||
Subject: [PATCH 3/9] mfd: rk8xx-spi: add PM ops and shutdown callback
|
||||
|
||||
The I2C transport (rk8xx-i2c.c) wires up rk8xx_suspend/rk8xx_resume
|
||||
and a shutdown callback, but the SPI transport does not. Add the
|
||||
matching PM ops (SIMPLE_DEV_PM_OPS) and shutdown callback that calls
|
||||
rk8xx_shutdown() so RK806-based boards can suspend/resume and power
|
||||
off cleanly via the SPI transport.
|
||||
|
||||
Generated-by: Claude Opus 4.6 <noreply@anthropic.com>
|
||||
Signed-off-by: Markus Fritsche <mfritsche@localhost>
|
||||
---
|
||||
drivers/mfd/rk8xx-spi.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/mfd/rk8xx-spi.c b/drivers/mfd/rk8xx-spi.c
|
||||
index 3405fb82ff9f..148af672ce12 100644
|
||||
--- a/drivers/mfd/rk8xx-spi.c
|
||||
+++ b/drivers/mfd/rk8xx-spi.c
|
||||
@@ -109,12 +109,21 @@ static const struct spi_device_id rk8xx_spi_id_table[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, rk8xx_spi_id_table);
|
||||
|
||||
+static void rk8xx_spi_shutdown(struct spi_device *spi)
|
||||
+{
|
||||
+ rk8xx_shutdown(&spi->dev);
|
||||
+}
|
||||
+
|
||||
+static SIMPLE_DEV_PM_OPS(rk8xx_spi_pm_ops, rk8xx_suspend, rk8xx_resume);
|
||||
+
|
||||
static struct spi_driver rk8xx_spi_driver = {
|
||||
.driver = {
|
||||
.name = "rk8xx-spi",
|
||||
.of_match_table = rk8xx_spi_of_match,
|
||||
+ .pm = &rk8xx_spi_pm_ops,
|
||||
},
|
||||
.probe = rk8xx_spi_probe,
|
||||
+ .shutdown = rk8xx_spi_shutdown,
|
||||
.id_table = rk8xx_spi_id_table,
|
||||
};
|
||||
module_spi_driver(rk8xx_spi_driver);
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# patches/driver/mfd/rk8xx
|
||||
|
||||
Rockchip RK8xx PMIC family (RK805/RK806/RK809/RK817) MFD core patches.
|
||||
|
||||
## Patches
|
||||
|
||||
The `0010*` patches here are sister patches to
|
||||
`patches/driver/gpio/rockchip/0010a-…` — see that README for the
|
||||
full context (split from misc_patches/genbook/kernel/0010, the
|
||||
RK3588 suspend/resume monolithic patch). **All marked WIP — do not
|
||||
include in fleet manifests until the upstream-targeting shape is
|
||||
decided.**
|
||||
Reference in New Issue
Block a user