Files
armbian-build/patch/kernel/archive/uefi-x86-7.2/4005-HID-magicmouse-fix-regression-breaking-support-for-M.patch
T
Igor 6a2ff579d2 uefi-x86: resync 7.1 and 7.2 Apple-T2 patches from t2linux (#10550)
* uefi-x86: resync 7.1 and 7.2 Apple-T2 patches from t2linux

Drop the locally-copied Apple-T2 patch sets for uefi-x86-7.1 and
uefi-x86-7.2 and replace them with the current series from their
upstream home, t2linux/linux-t2-patches (branches 7.1 and 7.2), where
they are actively maintained. Only *.patch files are kept, matching the
family config's own auto-download cleanup.

This realigns both trees with upstream: the 7.1 SMC stack moves to the
macsmc series and both gain the APFS driver; 7.2 additionally picks up
the t2bce driver stack rename and the amdgpu/ACPI T2 fixes.

Signed-off-by: Igor Pecovnik <igor@armbian.com>

* uefi-x86-7.1: rebase t2linux magicmouse onto 7.1.12; drop broken macsmc-power

The upstream t2linux 7.1 Apple-T2 series does not apply/build against
Armbian's 7.1.12 kernel, which has since absorbed much of the magicmouse
work upstream. Carry three Armbian deltas on top of the resync:

- 4001: drop the "Add .reset_resume for SPI trackpads" sub-patch --
  mainline 7.1.12 already defines magicmouse_reset_resume() and wires
  .reset_resume, so the out-of-tree copy is a duplicate (build failure +
  a hard-failing hunk on the driver struct).

- 4000 / 4006: bracket the transport-ops stack to reconcile it with
  mainline's backported recursion guard (db8d634128d2). 4000 reverts the
  __magicmouse_raw_event(nested) split so the stack applies against the
  flat function it expects; 4006 restores the guard on the resulting
  per-transport USB handler. Fixes "'nested' undeclared".

- Drop 3011 (power-supply-macsmc "add support for intel macs"): this
  experimental feature's battery-props rewrite collides with three
  mainline refactors in macsmc-power.c (fw_ge_27 detection, the
  macsmc_battery_read_bcf0 helper, reordered identity reads) and cannot
  be reconciled without a compile+hardware test. It is irrelevant to the
  qemu-uboot-x86 build target. The is_acpi field it consumes is defined
  by 3001/3002, so nothing else depends on it.

Verified: the full magicmouse chain (4000, 4001, 4004, 4005, 4006)
applies to v7.1.12 with no corrupting fuzz and is structurally
consistent. Compile is left to CI. The durable fix belongs upstream at
t2linux (rebase their 7.1 branch onto current 7.1.y).

Signed-off-by: Igor Pecovnik <igor@armbian.com>

---------

Signed-off-by: Igor Pecovnik <igor@armbian.com>
2026-08-28 20:09:29 +02:00

55 lines
1.8 KiB
Diff

From 1075f28377eb60788c78aedb1b9d7e9fa2f01bd7 Mon Sep 17 00:00:00 2001
From: Aditya Garg <gargaditya08@live.com>
Date: Wed, 8 Oct 2025 01:48:18 +0000
Subject: [PATCH] HID: magicmouse: fix regression breaking support for Magic
Trackpad 1
The case HID_ANY_ID and default are technically the same, but the first
one was assigning no report to the Magic Trackpad 1, while the second
one assigns the correct report. Since the first case is matched first,
the Magic Trackpad 1 was not being assigned any report, breaking
support for it.
Signed-off-by: Aditya Garg <gargaditya08@live.com>
---
drivers/hid/hid-magicmouse.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index b40f41168..4bf49d7ca 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -1589,7 +1589,7 @@ static int magicmouse_probe(struct hid_device *hdev,
report = hid_register_report(hdev, HID_INPUT_REPORT,
TRACKPAD2_USB_REPORT_ID, 0);
break;
- case HID_ANY_ID:
+ default:
switch (id->bus) {
case BUS_HOST:
report = hid_register_report(hdev, HID_INPUT_REPORT, MTP_REPORT_ID, 0);
@@ -1597,15 +1597,12 @@ static int magicmouse_probe(struct hid_device *hdev,
case BUS_SPI:
report = hid_register_report(hdev, HID_INPUT_REPORT, SPI_REPORT_ID, 0);
break;
- default:
- break;
+ default: /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
+ report = hid_register_report(hdev, HID_INPUT_REPORT,
+ TRACKPAD_REPORT_ID, 0);
+ report = hid_register_report(hdev, HID_INPUT_REPORT,
+ DOUBLE_REPORT_ID, 0);
}
- break;
- default: /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
- report = hid_register_report(hdev, HID_INPUT_REPORT,
- TRACKPAD_REPORT_ID, 0);
- report = hid_register_report(hdev, HID_INPUT_REPORT,
- DOUBLE_REPORT_ID, 0);
}
if (!report) {
--
2.50.1