Received: by 10.223.164.202 with SMTP id h10csp966977wrb; Thu, 9 Nov 2017 18:21:19 -0800 (PST) X-Google-Smtp-Source: ABhQp+RgqE8N6+gAy0UNNkfRbfQbNe/FxkGtrZp8VtV6Axbs/A8ugm3ziVEiiP1dCBcZRlWYb/3m X-Received: by 10.84.210.202 with SMTP id a68mr2368947pli.90.1510280479530; Thu, 09 Nov 2017 18:21:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510280479; cv=none; d=google.com; s=arc-20160816; b=v3W6MTPc7W/4mCXV6hnJ8lp3/gN2up0MtObzDCQIWPTAJMYW4a2cNKzX9tUD5TndZL rHZybAyiTxvjMy/P+E+4OQGTlaE8SXaA4Vy3HNwU4hY3TnZSvIOxBa2gF4NV3y2chY5l d9qyU6nUzxsKzYGjc3REAtKprwxbgwnyvgmvWA1XMQlQBsqjrhkBYzD7GVqUG7D2ZWsx OtSdZAzAdp0Rhr+XyU4B5dh+bFVJ5OBbzeP1YcMQviJFx1n8w7T55L00aCOVdgGEVUOj 1h7WrC+Iy+AMDxjVv/MApFaQE8OuwQ8v/PYeQtieWqYB5r/7iUSxmMWzvqp0V7s56UqU 2B0Q== 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=+W4H+5O0W4J4LNBxozi1VH0oTcpa4rcRWZCnOfemyYw=; b=BUJ49xHyokjkw8yIvdt+19qR8fdMrneKFFLG96Og5djbKJ9YweRCHVk1HRBnXpD9o4 Y9XUMf9RjA3AsZkyMYE3Qyg2snISq+H7s+9t5Nnw9VJDTPmMrcWc0dWCGFz1spf8OSMH j9rmDZzFEsLHoi9S0yZsNFqlZ71eLAuOjhow86PHWKAsqDpDU4z3gtD9siqHGmZ4lRIU Jh67ypKdhLXY5Fo3TK7x6/HH+vZUixR+MDrzDAngtaHbw5j9w+shm8VKgRph8TPKbQh7 phzWhYZ0gvxHa5Xn+GsWV+Qi00hLgr6BEFupDAUKRI8YWMRHnz75kpNu8d97A2GNf/jz idGw== 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 g19si8093892pfd.61.2017.11.09.18.21.06; Thu, 09 Nov 2017 18:21:19 -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 S1755663AbdKJCUa (ORCPT + 83 others); Thu, 9 Nov 2017 21:20:30 -0500 Received: from mail-out-2.itc.rwth-aachen.de ([134.130.5.47]:6873 "EHLO mail-out-2.itc.rwth-aachen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755550AbdKJCU2 (ORCPT ); Thu, 9 Nov 2017 21:20:28 -0500 X-IronPort-AV: E=Sophos;i="5.44,371,1505772000"; d="asc'?scan'208";a="22997482" Received: from rwthex-w2-a.rwth-ad.de ([134.130.26.158]) by mail-in-2.itc.rwth-aachen.de with ESMTP; 10 Nov 2017 03:20:26 +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 03:20:26 +0100 From: Stefan =?ISO-8859-1?Q?Br=FCns?= To: Darren Hart CC: Bastien Nocera , , , AceLan Kao , "Andy Shevchenko" , Subject: Re: [PATCH v2 4/5] platform/x86: intel-vbtn: support KEY_ROTATE_LOCK_TOGGLE Date: Fri, 10 Nov 2017 03:20:19 +0100 Message-ID: <2529521.pNZ5jyQYNe@pebbles> In-Reply-To: <20171110015422.GD9783@fury> References: <20171109224436.16472-1-stefan.bruens@rwth-aachen.de> <6070680.Ajd9sKXNqZ@pebbles> <20171110015422.GD9783@fury> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6185159.Gd0MK2uq1p"; micalg=pgp-sha1; protocol="application/pgp-signature" X-Originating-IP: [78.49.52.200] X-ClientProxiedBy: rwthex-w3-b.rwth-ad.de (2002:8682:1aa3::8682:1aa3) 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 --nextPart6185159.Gd0MK2uq1p Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" On Friday, November 10, 2017 2:54:22 AM CET Darren Hart wrote: > On Fri, Nov 10, 2017 at 01:15:09AM +0100, Stefan Br=FCns wrote: > > 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= =20 */ > > > > { KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press=20 */ > > > > { KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } }, /* volume-down key=20 release > >=20 > > */ > >=20 > > > > + { KE_KEY, 0xC8, { KEY_ROTATE_LOCK_TOGGLE } }, /* rotate-lock k= ey > > > > press */ + { KE_KEY, 0xC9, { KEY_ROTATE_LOCK_TOGGLE } }, /* > > > > rotate-lock key release */ > > >=20 > > > 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 a= nd > > > releasing the first time, and 0xC9 when pressing and releasing a seco= nd > > > 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 switc= h, > > > not a key. > >=20 > > Do you think I don't test the patches before sending? Let me tell you, = it > > *does* work. > >=20 > > You could also read the cover letter, where you find more details, putt= ing > > the patches in relation to each other. >=20 > A point of process. If there is context that is needed to explain the > patch, it belongs in the patch, not just in the cover letter. The cover > letter is effectively lost once the patches are merged. >=20 > > Just in case its not yet clear: > > The codes are emitted when pressing a button. It is a button, not a > > switch. > > There is no state handled in hardware. On press (as noted by the code > > comment), event code 0xc8 is emitted. On release, event code 0xc9 is > > emitted. > This sounds like the "former" scenario Bastien described, for which I > understand the use case to be: >=20 > User presses and releases the rotate lock button to prevent the > accelerometer for triggering screen rotation. >=20 > User presses and releases the rotate lock button to allow the acceleromet= er > to trigger screen rotation. >=20 > Is that correct? >=20 > If so, why do we need to emit two KEY_ROTATE_LOCK_TOGGLE events each time > instead of just the press event like the volume buttons? Volume buttons *should* send separate press/release events, to allow softwa= re=20 autorepeat. =46or the rotate lock button, I see no reason *not* to report the actual st= ate=20 instead of doing an autorelease. Kind regards, Stefan =2D-=20 Stefan Br=FCns / Bergstra=DFe 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019 --nextPart6185159.Gd0MK2uq1p Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSwWRWIpJbl0W4DemNvf0o9jP6qUwUCWgUM4wAKCRBvf0o9jP6q UyDsAKC1+BXXl5ZHKId965xeicoAxlpMCACgoiSdeK5Dql9AsbOJ42Tq9XGdKCk= =Rlf1 -----END PGP SIGNATURE----- --nextPart6185159.Gd0MK2uq1p-- From 1583642224447921482@xxx Fri Nov 10 01:55:15 +0000 2017 X-GM-THRID: 1583630386471293809 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread