From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f173.google.com (mail-dy1-f173.google.com [74.125.82.173]) (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 E1BE338C427 for ; Tue, 16 Jun 2026 21:23:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781645014; cv=none; b=MPQi/VDpTQk+NvBedDzw+XE+fRr0Stv2mKa843WlpUhgMu8spI1t/7JGwxU+Kd3vksbCJnD9DKUxf1r+t8MLV+xNq/wQuZhqTfZ5WtfHNpztwCMG+0tyzBODTnDzefqAkM8tnhkCGbQBGPMle9Z8SBz9Ib8QZApfTIkM6EnU+kY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781645014; c=relaxed/simple; bh=tOJ0BjM0ldVhSsSRHlSMBhHPNTPDe2oSS1RBcYunUGY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BHsOk/pKJLpqY+kRGw5iIyS6lq4t3x+5q1bPm9Bwon1v1mdBF4tLNpBn5GDRek10IKYIugGcUFoC81MhNYacbbVhSLWX8XZGDsIeBgsimVONq7OmJdaO8lWb/QBUARAH9I2FAmbZJtqjJXOORtESxnMvpuKQ3IQpcsxwq81H9D0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b19JHsqJ; arc=none smtp.client-ip=74.125.82.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b19JHsqJ" Received: by mail-dy1-f173.google.com with SMTP id 5a478bee46e88-30b6dad2382so5401740eec.0 for ; Tue, 16 Jun 2026 14:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781645012; x=1782249812; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=kVGHWnnJ0bnpjfbLQ9kiQcWUR79CsLTM1nJ13tFxcHw=; b=b19JHsqJ5m57yk8F1Ppz9Zz8y5Vvmz7mf6EkhSHLdJr0HbRrL5ZLsstiM9H/54Am4w Iwat9IWtbxJpgbsREgmnTza00VP9dVTBfIt1Y/QeyA5yV+im30tVKzekbRH34ghNxk6d AmyxXW1NQXNCu+IqPdtV3aTKtM1anr/yJAr7ZYmyh5MO8ReVE3MEPTLYfGIvPthn0X0Q Ur7FLNAACsrCKrUdzE/kDpmisHP/l5sgjWjHZQV444AUMXnE2ZYxJWYngNjXWs3HBANP lpMViTDfIK81/XszIWqAyOvPrq+gnj0CGM5WGwAA8hbVUFSM6H4tcafNnm25myTJcMVo d9wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781645012; x=1782249812; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kVGHWnnJ0bnpjfbLQ9kiQcWUR79CsLTM1nJ13tFxcHw=; b=lU9v11C5VGLZGdGdtGYg8Ax1SHaHx5glz95mUeIxjptHXXXEQru/9pMOK7pr8aOTp/ oz9Q403sVpVGxkgS0Fy3esmTHN7pAlba0Aai1D7klBJ76iG6fbt1yKth8VRkCO1DW4PZ mFrCzE/7Ff5fhdwgue0X3h+y/iyxH6Qc9zDm9+PNiCZUQXLdSXQSIdJFfhuatKmnhbnc POW8zwVunt5l4Aw7IwN6DfUji8tJvfvUGAXwYb3QF+DoJu566+DMerPW4pEoMtXx0XMY FOgHkuIHBNDuFkCMek6AkDTQzz7iAyqCld5DnsVl8U+Q1iHf2A5GKx7AnTCt8jM0M/Mn yYkA== X-Forwarded-Encrypted: i=1; AFNElJ8nNvcwXnW4JImh/xtssb2KNsLy+PRskudSLvCpjXHMwrLmt16jk2brja4Gqow7emGjD7CYTIamfvjkUvA=@vger.kernel.org X-Gm-Message-State: AOJu0Yw/6kPjMWd8mL6907zBRhzOlgqS7Eoluq1gZV2TQVvGnQPFPwSV eRpbqsIxI+wehnce+k+w5D/NadhkrhOU+Um1lfI/Gxpe+SmeDiFQYT0L X-Gm-Gg: Acq92OGRt5LZHr85co6b0Z3S+6mNgfPiJvAc/I/Ety3xPoQ29VR31HpjEDLnwaTz6Fv /zLLSgFAHdMC/vyL4ihKr3LaTreypkRwsGVCr2ugM/Rs9CnulQB1p5RVraYXKQ7x7pm3BaBv6FQ utPgosyZrJl/nXbt3ISzsZj6/VFg7QNTqP+UPVTC4F5QwN27SKsz23BgsS5FsbDkEcNQliDfuTs Yegue0vzW8EbMOUL8PJzfWOYUTHyGkjeReTYjSAAOMjRbT2jJpcnJjE1hZw5X9wWjts9AtLIecI 4c1MnnRiusxhMwwUDijvWI89GWrEJJjBdAKpxJ22F6d907yVe2BFtOo9o7cXd9P60tsZhkH64vE hSSWtJ+UD7sdFHfwhbsIrxW4jbOuqNYY3f/B0gnXkbFfIwLfRoQaaV8vQb8r+DEd381BE0zup2B cXrUAHP9VpS1fNwe4k9uAw/a+gzfm5C/Oy3R7fEJAHNqhkN2W1tP3uK0p89632heI= X-Received: by 2002:a05:7300:8c85:b0:2f0:5605:466e with SMTP id 5a478bee46e88-30bca92de91mr522312eec.9.1781645012000; Tue, 16 Jun 2026 14:23:32 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:cbae:d24:189c:2cb9]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30bd0deead6sm109387eec.26.2026.06.16.14.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 14:23:30 -0700 (PDT) Date: Tue, 16 Jun 2026 14:23:27 -0700 From: Dmitry Torokhov To: Svyatoslav Ryhel Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Pavel Machek , Sebastian Reichel , Ion Agorria , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v8 4/7] input: keyboard: Add driver for ASUS Transformer dock multimedia keys Message-ID: References: <20260528053203.9339-1-clamor95@gmail.com> <20260528053203.9339-5-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Jun 16, 2026 at 09:25:25AM +0300, Svyatoslav Ryhel wrote: > вт, 16 черв. 2026 р. о 07:26 Dmitry Torokhov пише: > > > > Hi Svyatoslav, > > > > On Thu, May 28, 2026 at 08:32:00AM +0300, Svyatoslav Ryhel wrote: > > > From: Michał Mirosław > > > > > > Add support for multimedia top button row of ASUS Transformer's Mobile > > > Dock keyboard. Driver is made that function keys (F1-F12) are used by > > > default which suits average Linux use better and with pressing > > > ScreenLock + AltGr function keys layout is switched to multimedia keys. > > > Since this only modifies codes sent by asus-ec-keys it doesn't affect > > > normal keyboards at all. > > > > I think using input handler to intercept ScreenLock + AltGr is quite > > awkward. I think this also passes the original key events (unless you > > make it a filter not a regular handler). > > > > I do not see benefit for reacting to AltGr+ScreenLock on other keyboards > > to activate the special mode on this one. So given the fact that you > > already mange the data stream when you split it into "serio" ports, > > maybe just intercept this key combo right there and create the input > > device and signal input events right there? > > > > Though it seems awkward at a first glance, media keys are integrated > with a standard keyboard in a detachable dock. It is highly unlikely > that media keys will be used with a different keyboard then the one > that is integrated with dock. Additionally, the ScreenLock key has a > code specific to this driver and is not in general use, so even if any > standard keyboard has AltGr but none has ScreenLock specific to this > driver except the dock itself. Handler is also set as observer so it > should not interfere with work of other input devices. I am not concerned about it interfering with other drivers, I am concerned about it unnecessarily connecting to unrelated devices (anything that declares EV_KEY). Again, I think having input handler is not appropriate here. I would fold this patch into the patch that introduces the 2 serio ports, enhanced the data stream analysis to detect your key combo, and then report through this new input device. You do not need to have the round trip through atkbd and the new input handler for this. Thanks. -- Dmitry