From patchwork Mon Dec 2 06:06:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5L2gIOiogOiogA==?= X-Patchwork-Id: 847135 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11olkn2039.outbound.protection.outlook.com [40.92.20.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9641C1D5CF9; Mon, 2 Dec 2024 06:06:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.20.39 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733119620; cv=fail; b=Ut2XsppDUMnuSKlspDIUk4twEXN0WLM72kXL84yfiClwy7NHqIcGnHKwiLjtbczBgFk1AWlng/Up04EQIyre+569Y0m6bO+L2hlKeiqqkEQtbSko21IjwdadzM9rODuKsAyI7vEDAgaaX/Ufn/KJEVj9WoJxQ4hPIHVwqqYaAFU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733119620; c=relaxed/simple; bh=7J0PDYvc1Yfn1UqAvdgZKtBa30jFyF8x+q5ck6zWO8g=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=QjHd60lEvL/clX83Qj609ZD98sxVcSL9gQtmy4sxXe9fHHl56X9pq/1eQo57g17RRYLwOD/FIH+AyDUXA6SjgFH2aPrT6xRFct6DHExevZ8tm/owXMyYgO+sWv2F6Syr6oA6BhlBVmh93kZ+nAznGWFJVDOQxmhaBC0l/ATQaWA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=soragoto.io; spf=pass smtp.mailfrom=soragoto.io; arc=fail smtp.client-ip=40.92.20.39 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=soragoto.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soragoto.io ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=R8hc/atiU1ViLeVewCBW+yq531YCM7xar2CHcxymOBlVFx0OR+QGk6TZYZP/qeClTDysWhUKIuPHEqPK+lxycirEko0/yoeRKhEjDJLhbRN8m91rkIk69hG2QpBtGtJo++eJv0FmlF6ycPnMzx16nc/c43wpXCZ4g/Zjn9xDWNTD6agTitL9F20oXJq2TQXICAEziYNFcN/FxZPZ4aTtBFBD7KAjlv7ftBu1lFKGAIdxwdJFka1WCrSg7WwQPBWMBnAAhFMgooLoBTLn0ZTlg6NIeXYTbB9sDqE7wFESXd7HdJGRQUx1f6WOf/Vc3QWajIk53vsfRD5h9PIIqAuKXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7J0PDYvc1Yfn1UqAvdgZKtBa30jFyF8x+q5ck6zWO8g=; b=JZjFaTUYS98NwNd6/ZTHnfi259ryTO0XINluY2SklqUPxPF1W+wV6oTTOA/Ac8vH7Re9A2xBtCTAL9oDqYaSjk/GWVbHLAUdLb/UD4Qd/Ni/Izef5C140m0zZZPtD6804NWbqkDUwwmscfkG+sYP1btpcyT70e4W9b2b9Nq/l/VMehSp3q1YUiUyDNIPNpmOShYg6u20cb/KRzyQJq9dueXavWNbovHmyreQAPGorhycZGazAIF+3Fgp71U53lYtriqix3EQMpFcMGhkQpcyX2bGe94Nw2Ev64NGRzGF/BISwzPp4Bb5HbmRX2OmEi9Z49V0fCgv+eCvREYPQXjwPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BN8PR14MB3441.namprd14.prod.outlook.com (2603:10b6:408:7c::23) by CH2PR14MB3723.namprd14.prod.outlook.com (2603:10b6:610:62::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.18; Mon, 2 Dec 2024 06:06:56 +0000 Received: from BN8PR14MB3441.namprd14.prod.outlook.com ([fe80::1538:64af:c2aa:e23d]) by BN8PR14MB3441.namprd14.prod.outlook.com ([fe80::1538:64af:c2aa:e23d%6]) with mapi id 15.20.8207.017; Mon, 2 Dec 2024 06:06:56 +0000 From: =?big5_tw?b?p0EgqKWopQ==?= To: Jiri Kosina , Benjamin Tissoires CC: =?big5_tw?b?p0EgqKWopQ==?= , "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] HID: magicmouse: Update device name for Apple Magic Trackpad Thread-Topic: [PATCH] HID: magicmouse: Update device name for Apple Magic Trackpad Thread-Index: AQHbRIBkLUc6MOTpSUC7jabUFegOeQ== Date: Mon, 2 Dec 2024 06:06:56 +0000 Message-ID: <20241202060545.21193-1-soragoto@soragoto.io> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN8PR14MB3441:EE_|CH2PR14MB3723:EE_ x-ms-office365-filtering-correlation-id: 5b43a6ea-e80b-469b-b877-08dd12978685 x-microsoft-antispam: BCL:0; ARA:14566002|38102599003|15080799006|19110799003|8062599003|8060799006|461199028|102099032|440099028|3412199025|1710799026; x-microsoft-antispam-message-info: =?big5_tw?b?d2lYcCtyQk5YTXBDc05IUjluNTZ5bTIr?= =?big5_tw?b?LzBnaFNZV3cyeER2VjBLejRwVFhGNlUrSnZxVmFuZmNoUi9DUWtMcm90eXU0dXVx?= =?big5_tw?b?RTFoZmFLZ3B4T0VhYk9RRmtuTHFRbEtiZFNpVThjT2tSZDdOM0l4VnFzN1BxTFRH?= =?big5_tw?b?TDJnNFU2bEQwaUlW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JoNDJlbzlrM1lO?= =?big5_tw?b?MXJUbnJhaXlJSm9kQ1laNUpWaHFFN1VWejNtVVdEWFhkYk53MGNKODNFZTFRdUJR?= =?big5_tw?b?SXJldjRlS3p1ZlY0SlVPb21oNG92WXAzU0xhTkVUaFpYQ1Q1ZmVkT0c1K0ltWHlY?= =?big5_tw?b?dURZSHZoREY4SU94SnBmSFFhdy9SZ05URHptMWMzS2p2aXVNbmdUeHRKTDhOcGFT?= =?big5_tw?b?Wjc4djJBMVQyZmRDcWllbUlmRFR4aWdteFpUeUZkbVNrWVY0di96TUNYcnhZWnRR?= =?big5_tw?b?OS9qYThYdWY5NS8wK0VqVSswRzNPNlYxdkhJYTBTV3JhYXA0bTBPeXdHdmNOdWwv?= =?big5_tw?b?QW0wQ2tuMHh6YTVvKzh4a1E9PQ==?= Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-7719-19-msonline-outlook-e4812.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR14MB3441.namprd14.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 5b43a6ea-e80b-469b-b877-08dd12978685 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Dec 2024 06:06:56.2657 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR14MB3723 Updated the device name for Apple Magic Trackpad USB-C when connected via Bluetooth. This change ensures the correct recognition of the 2024 USB-C trackpad and improves user experience. Signed-off-by: Qingyan Li --- drivers/hid/hid-magicmouse.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index ec110dea8772..a76f17158539 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c @@ -52,6 +52,7 @@ module_param(report_undeciphered, bool, 0644); MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state field using a MSC_RAW event"); #define TRACKPAD2_2021_BT_VERSION 0x110 +#define TRACKPAD_2024_BT_VERSION 0x314 #define TRACKPAD_REPORT_ID 0x28 #define TRACKPAD2_USB_REPORT_ID 0x02 @@ -567,9 +568,12 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd */ if (hdev->vendor == BT_VENDOR_ID_APPLE) { if (input->id.version == TRACKPAD2_2021_BT_VERSION) + input->name = "Apple Inc. Magic Trackpad 2021"; + else if (input->id.version == TRACKPAD_2024_BT_VERSION) { + input->name = "Apple Inc. Magic Trackpad USB-C"; + } else { input->name = "Apple Inc. Magic Trackpad"; - else - input->name = "Apple Inc. Magic Trackpad 2"; + } } else { /* USB_VENDOR_ID_APPLE */ input->name = hdev->name; }