Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp3874003ybg; Sun, 7 Jun 2020 13:26:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/GgIV7qcLQ1ftBZI03w3nODCAcCLwTso0T8o+GhtX9EwUDRzU6Gr4yVH+aQamhPz4mCYP X-Received: by 2002:a17:906:1dc9:: with SMTP id v9mr18712144ejh.252.1591561580155; Sun, 07 Jun 2020 13:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591561580; cv=none; d=google.com; s=arc-20160816; b=XM2wq98MiYhWhUJHx0MKgvfoMIbwfifcJ/YjoFM9AD99q9oPnL1ItR9LaSJL0bDoVY 9t2CZKS+OIFIJgmExPgBLmpq9sNojsE81UebtLVHIeSd+81hfgZ3Y8JTk8F1nSmK1JAu bc5vgyZwbSjfBX6GAcn6+vUdbsXJpvhZjQHHMA5Bip28pCCdRsZyrY7pbThPv3XFMOZg duRayHYRO5E9kphCob7mVQgAIjD46eP3Egzj31kR3/xvDRGZa6HqY21Vqf9z50tOlCkZ pz09vmnoDx1PKexSYaH32Xplbe17Ok7thAxTfOpTiWOEUCyj85I4t54z5LQwKRmpeJGI SeOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=g3N77Jcel43XTVqD9ub4UiJ2fyAwCulBKJ5lasrUuJY=; b=aH47atQCcXEREFTBgaNB5PDqMoBnJ0jQQyG06JYVDI+OpohFkMOzyJ6Ojv40GC256o GAS1ZaSdoeDWLO6yrxPq7fvVscyyUTSZOBIlgk5N/fuT7acQ0njsneUB45obzldCbDHB //+GkVeHAPsEvh4QghHUHx3a81hSMCAM57D83DwD6TC1/YtAJWggXiEANhW8nDKx2yZ3 UlZLnt3ROgHQDptRFlXzrVYh95jht9k+ecQ1r+l/9atFXDP0IL4moB0Z58gq+ukpLR+S AUomzz/KeP2jfp5wf8VE/NZlda7Qp9Slii7m2yy6vS8EgxgP/KCdUgtYpgEUvP/ikotT d+kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e13si7226311ejd.417.2020.06.07.13.25.57; Sun, 07 Jun 2020 13:26:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727829AbgFGUYS (ORCPT + 99 others); Sun, 7 Jun 2020 16:24:18 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:53638 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726093AbgFGUYS (ORCPT ); Sun, 7 Jun 2020 16:24:18 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 44C241C0BD2; Sun, 7 Jun 2020 22:24:15 +0200 (CEST) Date: Sun, 7 Jun 2020 22:24:14 +0200 From: Pavel Machek To: Andrzej Pietrasiewicz Cc: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-input@vger.kernel.org, linux-tegra@vger.kernel.org, patches@opensource.cirrus.com, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, "Rafael J . Wysocki" , Len Brown , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Kukjin Kim , Krzysztof Kozlowski , Dmitry Torokhov , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Vladimir Zapolskiy , Sylvain Lemieux , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Barry Song , Michael Hennerich , Nick Dyer , Hans de Goede , Ferruh Yigit , Sangwon Jee , Peter Hutterer , Henrique de Moraes Holschuh , kernel@collabora.com Subject: Re: [PATCH v3 0/7] Support inhibiting input devices Message-ID: <20200607202414.GB13138@amd> References: <20200604072853.GP89269@dtor-ws> <20200605173335.13753-1-andrzej.p@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E39vaYmALEf/7YXx" Content-Disposition: inline In-Reply-To: <20200605173335.13753-1-andrzej.p@collabora.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --E39vaYmALEf/7YXx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri 2020-06-05 19:33:28, Andrzej Pietrasiewicz wrote: > Userspace might want to implement a policy to temporarily disregard input > from certain devices. Wow, you certainly cc a lot of lists. > An example use case is a convertible laptop, whose keyboard can be folded > under the screen to create tablet-like experience. The user then must hold > the laptop in such a way that it is difficult to avoid pressing the keybo= ard > keys. It is therefore desirable to temporarily disregard input from the > keyboard, until it is folded back. This obviously is a policy which should > be kept out of the kernel, but the kernel must provide suitable means to > implement such a policy. >=20 > Due to interactions with suspend/resume, a helper has been added for driv= ers > to decide if the device is being used or not (PATCH 1/7) and it has been > applied to relevant drivers (PATCH 2,4,5,6/7). But is that a right way to implement it? We want this for cellphones, too -- touchscreen should be disabled while the device is locked in the pocket -- but we really want the touchscreen hardware to be powered down in that case (because it keeps SoC busy and eats a _lot_ of electricity). But simplistic "receive an event and then drop it if device is inhibited" does not allow that... Best regards, Pavel =09 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --E39vaYmALEf/7YXx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl7dTO4ACgkQMOfwapXb+vKNuACgw3cpx7Z15Nm3EAs8yyTuu1RS DsYAn1yorcZKMbA2oKpOoVakbRalRIie =Dt1J -----END PGP SIGNATURE----- --E39vaYmALEf/7YXx--