From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.48.2 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796256187; b=WEGbNNvA/pcbAe0qTKNUQPfV3RFzY2QyMSiR+CVeUcjfv6iAUYBZwGhsRzdRwmTYF+FF oS1Mey2RCf8ccxClmYy0ILAshKTvNHNEuZYv/8K9cNfHC5LA+C+Wbqs2q+fBIOzn8Gkot Sb8nsWVRyfsLiAq4QQ4SPuFmFNj8uuxij6FYylWdL0H+kjHcr8oG4G0PQ3I/jiS51BzSU WUxQvqVilhYe0SxQ8tFGrLNzjzyKTR/8Ix1AFQ6NlCFmKsfjQVb6RFju9vGOZZZ92XapN UzZY6suNbtuG+04hExGYR87z8RWufMaIQ3NAxvmfmoHuc+yVu2JSmmqXwKQK6qDCQhg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796256187; h=DMARC-Filter:DKIM-Signature:Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy:MIME-Version: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=qKg2zIerc+7Tf2XODg3NpAt0bFy1PFoOauAm4fYTBfs=; b=k6E04DQtp2nicOwB0SA/dHx+w6ltFkXzvpwwVWpItwSuU3vJOym5XvmSX9kxBuu08Mm9 TCOAp0nmCaXGxhkgFMNHO2GlZRNAtAS4TbYD4idTO/NN/soUuOsx0O92UouMRKJ7lFaOZ 4r8EgDMHfHVu1FG/xGI4H7rCpipTZAHYlWIK4m07GrDMlf4Tg118U7SgFOwek+F8P/REI 2g9uDUaU34wtbVM7PnWQWqDOQFyEte9TCU8olayAqeKSE0zwlsNIhnqag5lG15ELhXR/3 qIdZ4xMo1ctCcphIHDAnYhtS/Cj1+e/14sgJIwhXH/eEiGIwg/7a5Q5plDma72nLaFQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=k3W2Om+1; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.48.2 Received: from MW6PR02CU001.outbound.protection.outlook.com (mail-westus2azon11012002.outbound.protection.outlook.com [52.101.48.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EA37606A322; Thu, 3 Dec 2026 00:03:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4EA37606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=k3W2Om+1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SIKC7VLf2jkYYh2nCru1gc3jkNWXkgRw/LwfDE8hGbD/WBKSdOLERvE0KI0XmcFg5PCMFWB+XWw75qCmE/9QYXleu0n2gPhPfdOFN3Z0NScczY/4LvqMWjxvO/h4nTEc9nQgyoZb7d0ON5/X/Jm7x2PO8AslMouvkLr9S748cw3DQQNaBhKQH0vcru5PCciADGioxERfslLRr1penozwcw03aCMKgIZc8i+ig3BD94dhE2nSRn4FKksqrlAUl7qM+GV7j4DD4+kvCjbLInth5bsiM796kNMKSXJ71lhIUlp7ZWoXG8hR+3R5r5HYbDPIVQdyL1HldEEzm6vayGU37Q== 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=qKg2zIerc+7Tf2XODg3NpAt0bFy1PFoOauAm4fYTBfs=; b=w4RynXiSv2YGKbUc4VxajPvdgpp07M90n71DOY5qt1+5wuU7YJk05K8o5Xcq90Osxx7MufW7Y87E6zZmFb6XhImdWb5JwWfFjuP3T4BqKx3i+fSeScec1diumsLk0H4uuv8AcCGLwjOPbuGlrWqAiBF2ZflmcB1NQCHY8zC3aYqMiLBdYjUUa7IsXPVgqJ5fZTS6CsFT94HTUZn/putBi4PKniOd1UA+EPPQ+gTJtpk5otu9zUYgIqAjDt95waVcq7z1FUA9/5MDDWeHPenRIYJJiAOu87jgiIZcfh0cUYEJFj4OWsW7QhjiOi9DX1KKUAbWEs/6JSKrIYe3ZQ1i1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qKg2zIerc+7Tf2XODg3NpAt0bFy1PFoOauAm4fYTBfs=; b=k3W2Om+11KE/l2b/jOOKXIdc4ilJL+G+Aw+GUV9ArNWyl0Sh8bbuFh72tJ4RPcQSOFY/sWiPAlO1JW3Suff2OD6n2PkFvgK4ZVHG4XyS2juSQtQWeMrt5oDFfxVYDz37xGDB3lLML919OCabP0931FscNupj2gmrv5N3ZY1acruZdnyrB+J4jw1KeK4Ha5WEXH+AetTzio2O3aciI5No9PsINQRDPe2x1xU6ePX8RaPIkkcNOSwBAVSLLYP98uJaJvqQJykWLald2veWx6ADO8owDXSVUn//4mJz4P98YPwishjXmVhz6vHHOGbSvS4Lst++fsgiuy2URkF9RZ2/SA== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CH0PR12MB5089.namprd12.prod.outlook.com (2603:10b6:610:bc::8) by PH0PR12MB8821.namprd12.prod.outlook.com (2603:10b6:510:28d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Thu, 3 Dec 2026 00:02:59 +0000 Received: from CH0PR12MB5089.namprd12.prod.outlook.com ([fe80::cb31:7ebf:51e3:d9f6]) by CH0PR12MB5089.namprd12.prod.outlook.com ([fe80::cb31:7ebf:51e3:d9f6%4]) with mapi id 15.21.0688.010; Thu, 3 Dec 2026 00:02:58 +0000 From: David Cemin To: hansg@kernel.org, ilpo.jarvinen@linux.intel.com, W_Armin@gmx.de Cc: mpearson-lenovo@squebb.ca, derekjohn.clark@gmail.com, xy-jackie@139.com, i@rong.moe, marco_giunta@outlook.it, ciro.pedrini@gmail.com, ldemarchi@nvidia.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 0/4] platform: lenovo: architecture independent home for the Lenovo WMI drivers Date: Wed, 2 Dec 2026 16:02:47 -0800 Message-ID: <20261203000251.1006053-1-dcemin@nvidia.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261130043245.758932-1-dcemin@nvidia.com> References: <20261130043245.758932-1-dcemin@nvidia.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0095.namprd13.prod.outlook.com (2603:10b6:a03:2c5::10) To CH0PR12MB5089.namprd12.prod.outlook.com (2603:10b6:610:bc::8) X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR12MB5089:EE_|PH0PR12MB8821:EE_ X-MS-Office365-Filtering-Correlation-Id: 56669341-b5f9-44a9-6086-08df50d0ca22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|366016|23010399003|1800799024|10067099003|56012099006|261021121427099003|261021123027099003|261022105027099003|261022075727099003|261009223027099003|261102123227099003|261028144727099003|261026140227099003|261026121527099003|18002099003|22082099003|11063799006|6133799003; X-Microsoft-Antispam-Message-Info: +wzd2/BspJtaW6RVIvmSOEV1hrSx0Pf4cAnz9/+YBrRJB0kAigqrycrnCgWBL8TToHtBP3RhYdYoVQeZtj+c0cMRY+ObR4df+jPAjZ5Tkp0W4cEIz8oHk9uKTOX1pvVUjfkUFacc55wOwIhuTIcFGIUVLYl7tYu7zFLQ5nfo05ey5Wf2nxvSpovmhTWc6hhrAbbQ8eHdM4Z9elD2NEnDuVppvnxAczdsZI2aGS9GI4K1YdeDgil9m9fgDvKvdUi8PSbsPiXRZa9qDeKvEdlfyWaZhqqwa9Ge+GCUvF6dYSJ1lWqsaGQFrO2FMBxZwBuox4MaAernSLkXUsYmbH/BO40Gh6oJgqXZ2mEwKLuxAOU40X/R8y26PQIlTbs7+NMsXtjnYhsFRLArWx4IuLIpsFzxoQ4Dxmri+zLSqxVV/5nCnSYscZ/w1CpL/PLI3HLE+cP8HzgvPZcbZtYnYeH7SHMR+afnockpbGU703p7ZZ7pQ2dghG2KcsHiLx3vQHYqRd4UlKOb1f7BlJ3MiasZnw7Kf0T/AaI5oMMn41wG9tGfaV92ezWGzt+NvEztrCUJqYK/deXms1nMpUYs21DB/ah7U7SuF9njZfEuyKQ9L6FVh1nQDbV+QQYtUu2jn1FdzgrbigxxKWBQDlylr7MTyV69RJS+wedyL3dj/Txp3io= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR12MB5089.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(23010399003)(1800799024)(10067099003)(56012099006)(261021121427099003)(261021123027099003)(261022105027099003)(261022075727099003)(261009223027099003)(261102123227099003)(261028144727099003)(261026140227099003)(261026121527099003)(18002099003)(22082099003)(11063799006)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RrwnEATMzjCM9Wa6078d318kOQpF1z/2/204u/8mBMb1NWIjUBrWh2oj+9Zo?= =?us-ascii?Q?Nbz69Nm2q44RRdrsmHGhehgwNi3eQibxCoBkLeSeCykc6fPlkPhmA0CIZdnK?= =?us-ascii?Q?SqoLEd4Evm57QpHOFVmFnLEIILa7edm8HOdY/XpHsSQgvlhqRlQpSMELz5c+?= =?us-ascii?Q?cNgio6N+cjtDiV62hDVA4uzTDg4+CVv5wCKlMXiWG9hEmRGuUTjZCZJliDjZ?= =?us-ascii?Q?9qb0zJtW3+JguiOOcfbHFHcqvzd+VFLG3LvaRUJ3y4YsYbIiGOVb3HiL/WF+?= =?us-ascii?Q?zRv3AOPrRpE08D3xrg4Q1VdXEW2q4NImjJoF6nHX8W8XCDJYXsK+J8Wavcez?= =?us-ascii?Q?l+jYIxov9SqdxhxUuAD8BJEOvnaG+t7J4yinafJmQlKEm3UVwzQWeaG5IC1Q?= =?us-ascii?Q?F24t56VUfSts63oF+hXSM5ronw4Ow9kdhS4fhBTCVn3z1mLZXLeXAdjJXfqr?= =?us-ascii?Q?TvaiZNxAtGfrkCGmTlOyH7YSbeAJv/3nd+myLz+zg2GGhS1aq89MnjP5A5kx?= =?us-ascii?Q?HUN+kb3lUlaznAkygJz8mvWAtv1sHCew16QKfszNJ1EZKwr2WUliBxwJJqJW?= =?us-ascii?Q?dNsc7D9z0nuO/ZZMGDJxHiIm++j9BDbCVNr6zcu0hFAqgBmwkiHM2WcgCxOI?= =?us-ascii?Q?+vAEmwoFkC4/mE+FIP70+hM2PymnkSKWKf8piW/sNtae7/TADACI0mugpfoa?= =?us-ascii?Q?Rk1/FA4JBC/+Bqq0OHu9XCQv4zUualC70ojCBZQ03n5narC7QBwcaZXC/KSx?= =?us-ascii?Q?Ca7pKJquPT9TbUpOHN8svfbuxpC+WsOzMbHkbqmkZCF6HCyPkZV+2LftT6MC?= =?us-ascii?Q?7t5YL5Xo7j9Gejb0fG+3ie7RtUs0g8g53nCpA33/ULzTSRTrxQ2YsZQpICds?= =?us-ascii?Q?hjRoapFSWlxVxbfZH3yB/V/aviW4wgKFyIOeoFceN+/j5XcrRJWgpCPmowP9?= =?us-ascii?Q?biNIruIqj1eLNG5UWsJR/8Dq86RdJAXRgJVhNDzmLXKJDdeOz8R7zM/q0O6J?= =?us-ascii?Q?vP8VUgot6LtBlcHhNdEAp+D+orT9djJKog9FZ+1DOz2XxP2BINvvJPCk7BOA?= =?us-ascii?Q?Ehm8UosKkWNkHkbH4fTxj1FzV7oyBOixhyam3Uqj4+vEp5aDYsRi8ZAuE7XY?= =?us-ascii?Q?/vPTyodneJmQEyb9RNBeX+MmD+yvr6iqIZKVVCrmb4g4lq06ZXoktSufjkYq?= =?us-ascii?Q?9zR7E5EIl3YU/UzKlpQlFPI7fvV0HbUa5s7FM/k9fsKa6YmgJbGvgg0b6q7Q?= =?us-ascii?Q?IUMqiNkvrzXKsXPRJt0Z+tS1nh/mmmTvg+SZuWeTyCDohZeIwEVGNojkag1a?= =?us-ascii?Q?ki5x7wn/BlM5ehnhlAbrn5l69dMAv3ZWppgBP9faAc7FENKqQRcm/VAF3cFv?= =?us-ascii?Q?3gC5Fd0YI0lo00LNU4yTDYjqH//dzKkd1CLKVoJSqp87XqFAfBQt0BVtVINP?= =?us-ascii?Q?3Tv6I9TThq+d8NUBKaUfiALY2xzSOlk6kUsuK8/OHtw7RR570MIDuxDNc9a2?= =?us-ascii?Q?xIAe43c6eB55HxEcVXf3IIV9tawihY8ZqF3Hynmpl97Cps3Uh7ebCr+7Smg9?= =?us-ascii?Q?JMp+IWyQzSfqMGaoPYU2c2PMzEIsT46BPjoZp67e3fazaYN8kho6UtEEPCwP?= =?us-ascii?Q?eJX3SzKeDS5KDTSx170kouO5ixarIIG6C2I9zJtxkvK9t/jwjr+YskIiFJ7Q?= =?us-ascii?Q?pGIrmT4UEUJY3NuErxBI77DI0Jky0QpdZbOyuCPTaQb//Ff64zwKZsI7UGtx?= =?us-ascii?Q?5EN3GyOSHg=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56669341-b5f9-44a9-6086-08df50d0ca22 X-MS-Exchange-CrossTenant-AuthSource: CH0PR12MB5089.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2026 00:02:58.6627 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: V3vFPaZXt8Ve6Y8zOleOCuFyQbg5tsQDTptrYGferUY+rhfXOEWKBJ4LwsLBIkjdGjOT7xaTdduzv0GVM1tdTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8821 Lenovo now ships ACPI based arm64 laptops whose firmware exposes the same ACPI-WMI interfaces as the x86 IdeaPad and Legion machines: the Fn key event GUID consumed by ideapad-laptop, the hotkey utility GUID used for the microphone mute LED, and the GameZone, Other Mode and capability data GUIDs behind the thermal operation modes. Since 884d53763d30 ("platform/wmi: Remove dependency on CONFIG_X86") the ACPI-WMI core builds on arm64, but the Lenovo WMI drivers still live under drivers/platform/x86, which is gated by X86_PLATFORM_DEVICES. This series: 1. moves the architecture independent Lenovo WMI drivers into a new drivers/platform/lenovo directory, following drivers/platform/surface; ideapad-laptop, thinkpad_acpi, think-lmi and the Yoga tablet drivers stay under x86 because they need i8042, port I/O or x86 only devices; 2. adds a WMI Fn keys driver that owns the Fn key and Fn+Esc event GUIDs on every architecture, reports the keys through the keymap taken over from ideapad-laptop, and offers a notifier chain to drivers with platform knowledge; ideapad-laptop drops its WMI event driver in the same patch and subscribes to that notifier for its Fn lock LED and DYTC performance mode handling; 3. adds the keyboard backlight level events seen on the arm64 Yoga as ignored entries; 4. ignores the full set of Legion keyboard backlight level and lighting preset events reported by Marco, not only the three in the keymap today. The series is based on the review-ilpo-next branch of the pdx86 tree (f09fec5a32d4), which has Rong's lenovo-ymc series and Ciro's "Ignore keyboard backlight hotkeys" patch. Rong offered to co-maintain the new driver and is listed in the MAINTAINERS entry; Rong, please shout if you would rather I drop that until the driver is in. Patch 2 was tested on a Lenovo Yoga 9 2-in-1 16 (arm64): microphone mute, airplane mode, the Smart Key, the Smart Connect key and the Fn+Q performance key report input events with the same scan codes as before. v5 was rerun on a second arm64 model, a Lenovo Yoga Pro 9 15: the same five keys report the same scan codes and key codes, the airplane mode key toggles rfkill, and the FnLock (0x02), Esc (0x03) and keyboard backlight (0x41) events are ignored without an unknown key message. The Fn+Esc GUIDs are not exposed by that firmware, and the ideapad-laptop side is compile tested on x86_64 only; a test on a Yoga 3 or Yoga 700 (Fn+Esc) and on a machine where ideapad-laptop handles the Fn lock LED or DYTC would be appreciated. Patch 4 is not tested, I have no Legion: the codes come from Marco's report (BYAPR19MB229323713AAFB68EC5D8443EFC402@BYAPR19MB2293.namprd19.prod.outlook.com). Marco, Ciro: a check on your machines would be welcome, and I am happy to turn the Suggested-by into a Co-developed-by if you prefer. Changes in v5: - rebased on review-ilpo-next, on top of Rong's lenovo-ymc series and Ciro's keyboard backlight hotkey patch (Rong) - patch 1: LENOVO_YMC depends on LENOVO_PLATFORMS, so its selects of LENOVO_WMI_EVENTS and LENOVO_WMI_HELPERS cannot produce an invalid configuration (Rong); lenovo-ymc includes the events and helpers headers from drivers/platform/lenovo, which it needs since the lenovo-ymc series. I kept lenovo-ymc under x86 to keep the move free of functional changes; moving it with ideapad-laptop stubs can follow if you prefer that - patch 2: the 0x19, 0x1a and 0x21 ignored entries added by Ciro's patch are carried into the moved keymap; ideapad-laptop keeps its module init and exit functions for the keyboard backlight LED trigger and only drops the WMI driver registration from them - patch 4 is new: the remaining Legion keyboard backlight level and lighting preset events (Marco, Rong) - tested on a second arm64 model (Yoga Pro 9 15) - Reviewed-by tags on patches 1 and 2 kept, the changes above are what the reviews asked for or follow from the rebase; please tell me if you want them dropped Changes in v4: - keymap: "WMI ignored events" and "WMI keys" separators as in ideapad-laptop, the 0x40 to 0x43 entries grouped with the other ignored events (Rong) - ideapad-laptop: dropped the duplicate dev_dbg() of the key code, the Fn keys driver already prints it (Rong) - collected Rong's Reviewed-by on patches 2 and 3 Changes in v3: - driver renamed to wmi-fn-keys (LENOVO_WMI_FN_KEYS, lenovo-wmi-fn-keys) so it is not confused with wmi-hotkey-utilities (Jackie); header moved to include/linux/platform_data/lenovo-wmi-fn-keys.h (Rong) - patches 2 and 3 of v2 merged, so both drivers never bind the same WMI devices between the two (Rong) - lwmi_fn_keys_ prefix, per GUID struct lwmi_fn_keys_info with phys name, event size, scan code base and keymap, dedicated keymap for the Esc GUIDs, MODULE_AUTHOR (Rong) - keymap taken over from ideapad-laptop with its scan codes (Fn keys offset by 0x100, Fn+Esc 128) and comments unchanged, so userspace and the hwdb mappings see the same events; the new 0x40 to 0x43 entries moved to their own patch (Rong) - notifier: the event type is the action and the Fn key code the data, ideapad-laptop keeps its switch statement; the notifier is unregistered before the DYTC and LED teardown instead of devm (Rong) - ideapad-laptop: imply LENOVO_WMI_FN_KEYS and IS_REACHABLE() instead of a depends on, so existing configurations keep the Fn keys (Rong); dropped the ACPI_WMI dependency (Armin); #else/#endif comments - collected Rong's Reviewed-by on patch 1 Changes in v2: - dropped the WMI core Kconfig patch, 884d53763d30 covers it (Armin) - notify_new with the wmi_buffer, devm_kzalloc_obj, drvdata set before input registration, KEY_PERFORMANCE for 0x3d (Armin) - notifier chain called before the keymap lookup, NOTIFY_STOP suppresses the key (Hans, Armin); input device named like the ideapad-laptop one so the hwdb mappings keep applying (Hans) - camera lens cover switch and Fn+Esc GUIDs handled by the new driver so ideapad-laptop registers no WMI event driver at all (Armin) - 0x48 (Smart Connect) stays KEY_LINK_PHONE as in ideapad-laptop since ccc8c8481c1f (Marco Giunta) - collected Mark's and Jackie's Reviewed-by on patch 1 David Cemin (4): platform: lenovo: move the architecture independent WMI drivers out of x86 platform: lenovo: add WMI Fn keys driver and use it from ideapad-laptop platform: lenovo: wmi-fn-keys: ignore the keyboard backlight level events platform: lenovo: wmi-fn-keys: ignore all Legion keyboard backlight events MAINTAINERS | 11 +- drivers/platform/Kconfig | 2 + drivers/platform/Makefile | 1 + drivers/platform/lenovo/Kconfig | 102 ++++++ drivers/platform/lenovo/Makefile | 23 ++ .../platform/{x86 => }/lenovo/wmi-camera.c | 0 .../platform/{x86 => }/lenovo/wmi-capdata.c | 0 .../platform/{x86 => }/lenovo/wmi-capdata.h | 0 .../platform/{x86 => }/lenovo/wmi-events.c | 0 .../platform/{x86 => }/lenovo/wmi-events.h | 0 drivers/platform/lenovo/wmi-fn-keys.c | 312 ++++++++++++++++++ .../platform/{x86 => }/lenovo/wmi-gamezone.c | 0 .../platform/{x86 => }/lenovo/wmi-helpers.c | 0 .../platform/{x86 => }/lenovo/wmi-helpers.h | 0 .../{x86 => }/lenovo/wmi-hotkey-utilities.c | 0 drivers/platform/{x86 => }/lenovo/wmi-other.c | 0 drivers/platform/x86/lenovo/Kconfig | 70 +--- drivers/platform/x86/lenovo/Makefile | 7 - drivers/platform/x86/lenovo/ideapad-laptop.c | 214 +++--------- drivers/platform/x86/lenovo/ymc.c | 4 +- .../linux/platform_data/lenovo-wmi-fn-keys.h | 32 ++ 21 files changed, 534 insertions(+), 244 deletions(-) create mode 100644 drivers/platform/lenovo/Kconfig create mode 100644 drivers/platform/lenovo/Makefile rename drivers/platform/{x86 => }/lenovo/wmi-camera.c (100%) rename drivers/platform/{x86 => }/lenovo/wmi-capdata.c (100%) rename drivers/platform/{x86 => }/lenovo/wmi-capdata.h (100%) rename drivers/platform/{x86 => }/lenovo/wmi-events.c (100%) rename drivers/platform/{x86 => }/lenovo/wmi-events.h (100%) create mode 100644 drivers/platform/lenovo/wmi-fn-keys.c rename drivers/platform/{x86 => }/lenovo/wmi-gamezone.c (100%) rename drivers/platform/{x86 => }/lenovo/wmi-helpers.c (100%) rename drivers/platform/{x86 => }/lenovo/wmi-helpers.h (100%) rename drivers/platform/{x86 => }/lenovo/wmi-hotkey-utilities.c (100%) rename drivers/platform/{x86 => }/lenovo/wmi-other.c (100%) create mode 100644 include/linux/platform_data/lenovo-wmi-fn-keys.h base-commit: f09fec5a32d43dd3f9e32d531d05422a9f6191d0 -- 2.56.1