Received: by 10.223.164.202 with SMTP id h10csp872638wrb; Thu, 9 Nov 2017 16:17:01 -0800 (PST) X-Google-Smtp-Source: ABhQp+TInIuMn9/M+9qYjMHlcKfYalKHW7kzguhtQyx8EDUxoqoA8/EtDFmjOOeU7e+eCr02gF9+ X-Received: by 10.98.109.134 with SMTP id i128mr2294203pfc.66.1510273021571; Thu, 09 Nov 2017 16:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510273021; cv=none; d=google.com; s=arc-20160816; b=v6iH4RNrgnrnBFkOfNNiUR4MxSL/5piv9P1pqkDZdIN5AYDlI3RvzWj3yANbw27zMP GB/YhvygqgaYaR2rLrNhzJA/ZswroF1pl2TmjYEjzD2uUq4yAA5uoEJryMhfWRiT72Un TnVU9RcxraHfgQ1ycRVJHUiCl60ww3ApdApc6xPhv+580H3Sj+qLh9f2uBZ1G0R/wzB1 tkE7Iwg9r2nPAUz2RIZ2likX1cetyeyZ6ZnIUzJa0YGhFqztRDD8mCmilwaVxIK+V4EN mrCwUw8fDf709sUjyIslEee95IBBnbom3QhjfGsKwRSVqnAuGwmfGFSJq8vIpaUZq/jl kRlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=yn+mwtLKXVafZ/qTWnCIZz+F9AlpjrBIM277WGfDqLk=; b=oKsrHVOHfLNnTRtUv1wm4zgs3lj2g5ZjRqKh7Au623Iq5b7pWOSq56Gb5NyAYPtcdO p6EnGc3T8ykumh9UO+g5qvndjMZ8flIkmihQFFQXc0B04BNcbivnI6YJZqRGznAtBuGf 0uEZQBnYVJs+Xt0K4EMDxF4FF11CfrIZ7y7Pir6Eh7zBGmv54f7xL74p9HjYHWIHDQSy Oa2SxcaHkpui1dQIly90RZpUplUz7Ymy6v1WgYreAkL4tbzSvNbVN8oN84/+yVNT3GCc LxJBeFnF0oPE3HGErplNsl7H3ADZ3fpwp9CZ1CxXAEJWTLwPMbPmpBuZ+9PpDGF5bh3x f3+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7si7259071pls.588.2017.11.09.16.16.47; Thu, 09 Nov 2017 16:17:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755342AbdKJAQH (ORCPT + 83 others); Thu, 9 Nov 2017 19:16:07 -0500 Received: from mail-out-1.itc.rwth-aachen.de ([134.130.5.46]:45704 "EHLO mail-out-1.itc.rwth-aachen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754122AbdKJAQG (ORCPT ); Thu, 9 Nov 2017 19:16:06 -0500 X-IronPort-AV: E=Sophos;i="5.44,371,1505772000"; d="asc'?scan'208";a="22971332" Received: from rwthex-w2-a.rwth-ad.de ([134.130.26.158]) by mail-in-1.itc.rwth-aachen.de with ESMTP; 10 Nov 2017 01:16:04 +0100 Received: from pebbles.localnet (78.49.52.200) by rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Fri, 10 Nov 2017 01:15:18 +0100 From: Stefan =?ISO-8859-1?Q?Br=FCns?= To: Bastien Nocera CC: , , AceLan Kao , Andy Shevchenko , Darren Hart , Subject: Re: [PATCH v2 4/5] platform/x86: intel-vbtn: support KEY_ROTATE_LOCK_TOGGLE Date: Fri, 10 Nov 2017 01:15:09 +0100 Message-ID: <6070680.Ajd9sKXNqZ@pebbles> In-Reply-To: <1510270246.2624.43.camel@hadess.net> References: <20171109224436.16472-1-stefan.bruens@rwth-aachen.de> <1a034599-ff6c-4a42-8252-4f6007894f4a@rwthex-w2-a.rwth-ad.de> <1510270246.2624.43.camel@hadess.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2213328.B2MEAP0t9l"; micalg=pgp-sha1; protocol="application/pgp-signature" X-Originating-IP: [78.49.52.200] X-ClientProxiedBy: rwthex-s3-a.rwth-ad.de (2002:8682:1aa0::8682:1aa0) To rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart2213328.B2MEAP0t9l Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" On Friday, November 10, 2017 12:30:46 AM CET Bastien Nocera wrote: > On Thu, 2017-11-09 at 23:44 +0100, Stefan Br=FCns wrote: > > The Rotate Lock button event is emitted on the XPS 12 (BIOS A8, but > > not > > on BIOS A2). > >=20 > > Signed-off-by: Stefan Br=FCns > > --- > >=20 > > Changes in v2: > > - Emit KEY_ROTATE_LOCK_TOGGLE instead of KEY_ROTATE_DISPLAY > > - Use separate up/down events > >=20 > > drivers/platform/x86/intel-vbtn.c | 2 ++ > > 1 file changed, 2 insertions(+) > >=20 > > diff --git a/drivers/platform/x86/intel-vbtn.c > > b/drivers/platform/x86/intel-vbtn.c index e3f6375af85c..a484bcc6393b > > 100644 > > --- a/drivers/platform/x86/intel-vbtn.c > > +++ b/drivers/platform/x86/intel-vbtn.c > > @@ -42,6 +42,8 @@ static const struct key_entry intel_vbtn_keymap[] =3D= { > >=20 > > { KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* volume-up key release */ > > { KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press */ > > { KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } }, /* volume-down key release=20 */ > >=20 > > + { KE_KEY, 0xC8, { KEY_ROTATE_LOCK_TOGGLE } }, /* rotate-lock key > > press */ + { KE_KEY, 0xC9, { KEY_ROTATE_LOCK_TOGGLE } }, /* > > rotate-lock key release */ > How are those events sent? When pressing and releasing the key, do you > receive 0xC8 followed by 0xC9? Or do you receive 0xC8 when pressing and > releasing the first time, and 0xC9 when pressing and releasing a second > time? >=20 > If the former, then it's not going to work. The release is supposed to > be ignored, as you send the event with sparse_keymap_report_event(). >=20 > If the latter, and there's an actual state, does it disable a device > on-board, or activate an LED? If so, then it would need to be a switch, > not a key. Do you think I don't test the patches before sending? Let me tell you, it=20 *does* work. You could also read the cover letter, where you find more details, putting = the=20 patches in relation to each other. Just in case its not yet clear: The codes are emitted when pressing a button. It is a button, not a switch.= =20 There is no state handled in hardware. On press (as noted by the code=20 comment), event code 0xc8 is emitted. On release, event code 0xc9 is emitte= d. Regards, Stefan =2D-=20 Stefan Br=FCns / Bergstra=DFe 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019 --nextPart2213328.B2MEAP0t9l Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSwWRWIpJbl0W4DemNvf0o9jP6qUwUCWgTvjQAKCRBvf0o9jP6q U7r6AJ9hiJWEwyFHYEBfvsyPxnUuRLJKAQCgp2dyb6epZGQuTUtaOg4kQnuoYiU= =exfs -----END PGP SIGNATURE----- --nextPart2213328.B2MEAP0t9l-- From 1583634178738139428@xxx Thu Nov 09 23:47:22 +0000 2017 X-GM-THRID: 1583630386471293809 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread