From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B95D2FBE1F for ; Sat, 11 Jul 2026 05:52:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783749179; cv=none; b=JYWfdpaXa0/P4MipHvXpShBvUjS3X8V8i8kLUxPAafW3K4XrTlKBZOU2eGK5EVA1TnzthcVZZkaq/pib7No1IGKb3Y1qTFmfwVbUrryzcsMOIX4P6TIRSSfUBecZw8kdJ+dI5l6lq8TygFAYLvRQEbzwD8HYdTdHHjHNCtYiqXQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783749179; c=relaxed/simple; bh=xphEW9XTWpS33CqICv1EZRuHhUQvJtLUGr5IZoIgBws=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=K80WtB83aJp9reZyr8E7WJRa9L8HeqO0VRbjBj4VvmWJVEkWSTavzEEsDqp9TAy8atclfePSJxBkP9jmBAOThZ1qUy6kqMNCsGiioSSSyxl4vDw2g2kDlqPNlz5QGUNPq7g8lTmmH73vw0ATSKOmg5ZWJzk7bfLSbF3QnvAeSfs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-848d21bbaffso174490b3a.0 for ; Fri, 10 Jul 2026 22:52:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783749178; x=1784353978; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=TiuABHyoT5VB4eAodbqY6nxwBvN1wwB2YRwpSyn5yOw=; b=DqSqa6Ju31FbGi0gvIX2Gb5hfloFsUnn0aIARI5WmqvFu0fXmfaEyrqiq501Cls0cI IRTXUEn1UpL/uf6QXUHLBCRO1V2ykAWaRy6A3jHwve9z9kbfmut72HmawJJeueY4o/Zw qu3S2hAQkq2hPLoBmbF6IUH+q4aM43OLzODVwtuTkHORFwGB54pyIgChbBI1KJP8YldA iFOON2Oz3hZ9AwAjRyPgZpowGLySqwWA/RCG3DcujhO/pgcIqq00Cu4SqtEo81wu2w21 ACjUMww3QxKtq/pK6ZvyaGsW6NeIcXJb+7eYSQ+DwVk2wYsMsTiORRB4Ap2AbOifH1AF IiSA== X-Forwarded-Encrypted: i=1; AHgh+RpQvTtS/M508mSN2lDMLttmvGYrFu7nvuG2imd0wVs8JvYEOqGPcdrFbzArL9EYdpWxn1CM7l3wOFeLY9o=@vger.kernel.org X-Gm-Message-State: AOJu0YzqN/pt27C2K8X5ZSWcQiPxA/yDLF/2bsgBGuFzWd/OBqgsX4jF +iqZEmxjYBz59C9uDqFg6XmnKUftATNcpui2FHtELbaCoCbvtsiSVlY= X-Gm-Gg: AfdE7clCrUefEbv7TLWI/wEcENal2P/Ajr5LpyCEbZE42hDMXq3HlfXkAhZxVPR1vbK eeLPo8AK7apJcOybm6ColNLZSry1xy9NP8wh5yfBkTJu4ItzT0RxysEF4LfwKWxCmvLiTjMRDRY Mv5u49Gb8XxHxp+FwUcWZztd+dETN8uRYyM0MdUTBwTeKJpaMOqhc53xBgMJS9b+eH7xbn95zN8 P7TufDzAZhwSSzFPbHc0c0WqeWuMgoGHG2uytbV482Vgd8EGYtK1CtylmN6nu5RO6PbbSuEEOi4 ODfecYOVZPFnHrbOe7tDTkt7Tt6S22Wcg+SxEbwxaiGxXQJelAMzafGQ/+HN1286SGoZPrmPWMV /N6h0Qyd268pjlILGSY4okOlY7SyS+qCr23iE4VaXNxgBkjOaxiue2ebtTmMZ6gQjGTV0DDB0V/ S9ocDpp/L3FjIWgYLkR/CCSxaUGQF7WzRGwiSgaR0i6/zCZAuYFRO/z6p4ObA6RWYpcc8Ma2pox f5mmZiiuLEYUm6vNGI+1AwQhQ== X-Received: by 2002:a05:6a00:2346:b0:848:2f84:736 with SMTP id d2e1a72fcca58-8488990b70amr1881143b3a.73.1783749177965; Fri, 10 Jul 2026 22:52:57 -0700 (PDT) Received: from penguin.tail0a1999.ts.net (61-228-52-13.dynamic-ip.hinet.net. [61.228.52.13]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8484123ce87sm5360084b3a.58.2026.07.10.22.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 22:52:57 -0700 (PDT) From: Shih-Yuan Lee To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Shih-Yuan Lee Subject: [PATCH 0/1] Input: applespi - force PIO mode on MacBook8,1 Date: Sat, 11 Jul 2026 13:52:46 +0800 Message-Id: <20260711055247.5412-1-fourdollars@debian.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Dmitry and the linux-input community, This patch addresses a long-standing issue on the early 2015 12" MacBook (MacBook8,1) where the SPI-connected keyboard and trackpad intermittently fail to initialize on boot, and consistently fail to initialize after warm reboots (soft restarts). The issue stems from a race condition between the Intel LPSS DMA controller (dw_dmac) and the host SPI controller (spi-pxa2xx-pci). When DMA mode is active on this controller, transfers consistently time out (taking exactly 200ms per transfer), leaving the applespi client device in an uninitialized and unresponsive state. When the host controller probes before the DMA controller, it gracefully falls back to PIO mode, which operates flawlessly. To resolve this reliably without introducing platform-level DMI quirks into the generic Intel LPSS PCI driver (which might affect non-Apple systems), this patch introduces a targeted DMI quirk directly within applespi.c. On MacBook8,1, it overrides the SPI controller's can_dma callback to a custom helper that always returns false. This forces the controller to use the rock-solid PIO mode specifically for this device. Testing shows 100% reliable initialization of the keyboard and trackpad across multiple soft and hard reboots. Shih-Yuan Lee (1): Input: applespi - force PIO mode on MacBook8,1 drivers/input/keyboard/applespi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.39.5