From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (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 A6D5E434E32 for ; Mon, 20 Jul 2026 16:22:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784564561; cv=none; b=rhRaSGbPU9DlKS67RmQXkcGw5YNFgkaCRsMiB1vRB9Yp+EpE89qNsNQLVsw91yAAwFVC6soPLoxn+SP61KsOe+UTp6rcdlNLE98WHhdIpMutO8+IoTD6fgK4P9xiD24zr4DxoGBf5jTFONlbXBbC6U4J1vWmfxXwfcKYJIc2UCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784564561; c=relaxed/simple; bh=9pB2UASsNT6tRLrddKLGk3chBzvFw90R7Bm4zhenDzE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=T0PIcWAi9+qyG4WtgNZGWuaN51o4bOiz6b6QZv3giriIG4AlxBJ7rc1rBgbgvOBm8/tTuQA3HIcwoJ5bXc/VHTRXdZwCgO2xOHGbuksEiQXlFFNLEPinAWdfY+0JEPhVoGgM17tL8E6n1mQmM5d9UG1SSmMLiPFxir717ToKL9E= 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.216.54 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-pj1-f54.google.com with SMTP id 98e67ed59e1d1-38e07ebd263so4498003a91.1 for ; Mon, 20 Jul 2026 09:22:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784564551; x=1785169351; h=content-transfer-encoding:mime-version:references:in-reply-to :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=iIWbRQOsRBXbHQl+Eokek9JB8ruZxyWntLUXaYunpkA=; b=fHL4xW2/XsqK/jy1JlJC9JeLpM1lKz8Q3Wnth0jERJ/F0TlNmx/nL7apfH/IopGWWw m5olHPFj199STqrzGDQNA3+Lj2NWx3wP1JYkLRXONtxWQzMQTynfFT58B6A/ujqsyP6P T8AGZlRwoj7aIKN2zrhk6ELKauDihPoXpJKKLHke+LItA8YxRP7jumdJOQ+sRf1jh7Id wnXvybboxboqpkqLjHRAh7NL3D/F6mR5A/rvau4Pi6y7C4AOYL6X+61zD2jinrzcF2Gi uyGgsjZ6Fs7uwnGOU/XIw1jAy1rkAyqYOL/N4upd12enBrwBmNM4p7YWPz9C3yDQO8sE cl0A== X-Forwarded-Encrypted: i=1; AHgh+Rol/CsvojNubiMc6coK1bHfzvShlxACQETQBQQjMbfUEq+UL1qIvRhW0w27lcbKh/xe7f0mLtJZlN8r/J0=@vger.kernel.org X-Gm-Message-State: AOJu0YygTNoxfPRaKGljG0Pt7uQ2YI9qZ4tOAFLDIjArxB8/M8iZMwmp JTgdnqdiEI8MSYiyQDQRjVoRldZCUk0QyZ//1u9kYX16E9NFXBqBjTM= X-Gm-Gg: AR+sD13T1oF3poc6EoxSi8rXiT0z/WZ4aQocvV/Jf140ot3B11W2YZEcDj3zsyn2aoO T8T6L2lD9/ov1F2Ld+fu3/z7e6tJj+cuSlt9pH0orPCM0WDxXqIJf90S8f4mgGOtlmXJkoea57t ChXQiQAc4CRT+kHPecsfwXRJkJTXg0dPqyZhOFvxsNe7SAQJsPhvWcbz8jWfLjW2Q0WwXnrTXfT HBZLJLeMAMCyXWqPEI+5YCYswLEw5QFvXhZUgFbspJb7MaMgrIksrQ+nPenFS2VwR3J7s6U5GuU ZzGRvtmLouNJicz6rVyjjsR/Jomr/Idu0hFZYIDpDDWCpxP3TXcq/KIFL0CCJFei5l8HGr2AWj9 j4UXVPopxFzh890ccy5V/6pliEAzzyZLQDDjBz3PzShmtzrklyg5TbLBVQEAnMBwGjUnnNMfYKF BhjdrxdsqqmWZcMnJ8qviUiIu8+vE5vonKi5lsZzSgEYLOz7G1VaBmJ4xwwSQSWPiFHy3R5qY4Y cGPIJSPorAX/WdBEg== X-Received: by 2002:a17:90b:2151:b0:38e:59c2:cbc5 with SMTP id 98e67ed59e1d1-38e59c2dc76mr8159002a91.18.1784564550787; Mon, 20 Jul 2026 09:22:30 -0700 (PDT) Received: from penguin.tail0a1999.ts.net (61-228-16-100.dynamic-ip.hinet.net. [61.228.16.100]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38e9205d358sm29366a91.3.2026.07.20.09.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 09:22:30 -0700 (PDT) From: Shih-Yuan Lee To: Dmitry Torokhov Cc: Mark Brown , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Shih-Yuan Lee Subject: [PATCH v3 4/5] Input: applespi - prefer asynchronous driver probing Date: Tue, 21 Jul 2026 00:22:18 +0800 Message-Id: <20260720162219.32324-5-fourdollars@debian.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260720162219.32324-1-fourdollars@debian.org> References: <20260720162219.32324-1-fourdollars@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Set probe_type to PROBE_PREFER_ASYNCHRONOUS to allow the driver core to run applespi_probe() asynchronously. This improves system boot speeds by avoiding blocking the main kernel thread during the 3-second touchpad detection wait. Additionally, clean up applespi_tp_dim_open() by simplifying product ID retrieval and avoiding dereferencing touchpad_input_dev without a helper variable. Signed-off-by: Shih-Yuan Lee --- drivers/input/keyboard/applespi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c index 6db4eeca3060..a21e89f30387 100644 --- a/drivers/input/keyboard/applespi.c +++ b/drivers/input/keyboard/applespi.c @@ -1029,6 +1029,7 @@ static void applespi_debug_update_dimensions(struct applespi_data *applespi, static int applespi_tp_dim_open(struct inode *inode, struct file *file) { struct applespi_data *applespi = inode->i_private; + struct input_dev *touchpad = applespi->touchpad_input_dev; if (!applespi->touchpad_input_dev) return -ENODEV; @@ -1037,7 +1038,7 @@ static int applespi_tp_dim_open(struct inode *inode, struct file *file) snprintf(applespi->tp_dim_val, sizeof(applespi->tp_dim_val), "0x%.4x %dx%d+%u+%u\n", - applespi->touchpad_input_dev->id.product, + touchpad->id.product, applespi->tp_dim_min_x, applespi->tp_dim_min_y, applespi->tp_dim_max_x - applespi->tp_dim_min_x, applespi->tp_dim_max_y - applespi->tp_dim_min_y); @@ -2044,6 +2045,7 @@ static struct spi_driver applespi_driver = { .name = "applespi", .acpi_match_table = applespi_acpi_match, .pm = pm_sleep_ptr(&applespi_pm_ops), + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = applespi_probe, .remove = applespi_remove, -- 2.39.5