From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54F36C64E7A for ; Thu, 3 Dec 2020 06:28:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E56F2206E0 for ; Thu, 3 Dec 2020 06:28:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E56F2206E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/noe+JdfxDjfqFNWK8FasumsFUnPc9bCRhqDCfDTTc8=; b=vj4eT8UlcrSQcAuFz7toQGXUk 64eq7Ra9oJ5fTtB4AdyVSwqjXes1K278X/9KklMJChN1zUq81/hH4JEyXJ3dReghzcBOI9B/UwODJ Rili6+1hItBvTnaZwcvQ6ylGizsx6l92R4ohrTrNjf0+IKPwQ8O4t6orod9ipRq53EDf7otnfxOLE 3/ufGi4vsUdjFvxe/OypErHNb3FZ0uPyw0NN/skOjREK8pP/GoJrBENeWmS3uzJMNr4UXDY05XmD8 aUo0DzXEYjJ+BUor6moV3W6KyABAKiIOdr4J6KokeLthK3P2ENri7Uek/xfVdvmlL9PSjvY7BEptX HNjF88wJA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kki59-0003Sf-Jm; Thu, 03 Dec 2020 06:27:11 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kki56-0003R9-3a for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2020 06:27:08 +0000 Received: by mail-pl1-x642.google.com with SMTP id b23so560639pls.11 for ; Wed, 02 Dec 2020 22:27:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=HbJt6rJA01QCvzasS4bsjMswEGXIMUsY6Sd2CuWo+TA=; b=dVxEWp/RvZDYdBHbNkIa716w8SrdD3Bx6vfJPohQ0OY/cKAqNuPT4RBfPrmRvG0bYK cdFDoQiBbwaCt8XKFTDl5hC0I2JzBvKpljBGUkGC9ndGlccVEe/kYwkw7WBcKhdqGn2H pOi1ZBiDIO6A3GAeoU7/o9bEHcB2S0TJGTmxdkYI1QwTdN4/wspINEUxRbUk1Sfd55vN wUB9lCevCMcTWq74lHPkjJiyP/EMoLSzXaK8aIkNjvZnE88DUJBZdagqZWqlI+fNHBBK 8NKV6uP6PN1rE/aWSmY2qW8BnbMfd4KKtDSki68dYhes24N+RIyMjlzqNeTtW+6rgEqD FzZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=HbJt6rJA01QCvzasS4bsjMswEGXIMUsY6Sd2CuWo+TA=; b=dcfrgBiWEBoiQ2jlq2Hpdl1E4+BdsPWOdeVyP62tnN2wlabdS/uR/19ZkbUBP52euY vAE6/OXljIMeNGUGGG19k6Ws8ekAX52tPQWOwZBksQBw6dAexU2xd8jAOr0YbJVCPAXF TVhQMy22OGNHKp79niHoBsxCcJg/aqnacAmvXpyvYLsioSszIHMT6mxaD7UXncnoxDRS iY9rhvwnaKTIfQjUjUfp7hlcx/WEUlwgShpOhZFN4BIbnhEfZ2bd948QNqHuNqmzn906 jgJ+NcbWQGoooCPL9sHvYbgVcAt0DWcGr/RKZvO7p1SAOa8z1Ap7FLswyh7Zo8M1rnZV m6Uw== X-Gm-Message-State: AOAM532A8CSwCwpSrfGbJmQsBi211UTRsf/V9xFrtYUHM6dhDyVZOT1h Y8O3I9CqPxGx2Wz1MwacKro= X-Google-Smtp-Source: ABdhPJxLIrp/Z8QgkGxETX0iBcSEzO8X/mrXwjgbBiDfZrpesga+0Jq3qeSuLPnrQoJ+EjG3lKhetg== X-Received: by 2002:a17:90a:a501:: with SMTP id a1mr1531028pjq.4.1606976823776; Wed, 02 Dec 2020 22:27:03 -0800 (PST) Received: from google.com ([2620:15c:202:201:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id gw7sm283892pjb.36.2020.12.02.22.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 22:27:02 -0800 (PST) Date: Wed, 2 Dec 2020 22:26:58 -0800 From: Dmitry Torokhov To: Andrzej Pietrasiewicz Subject: Re: [PATCH v4 7/7] Input: Add "inhibited" property Message-ID: References: <2336e15d-ff4b-bbb6-c701-dbf3aa110fcd@redhat.com> <20200608112211.12125-1-andrzej.p@collabora.com> <20200608112211.12125-8-andrzej.p@collabora.com> <20201005181014.GL1009802@dtor-ws> <20201007011102.GR1009802@dtor-ws> <20201007011249.GS1009802@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201007011249.GS1009802@dtor-ws> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201203_012708_179825_B367DA34 X-CRM114-Status: GOOD ( 34.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@collabora.com, Nick Dyer , linux-iio@vger.kernel.org, platform-driver-x86@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, Laxman Dewangan , Peter Meerwald-Stadler , Peter Hutterer , Fabio Estevam , linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , Jonathan Hunter , linux-acpi@vger.kernel.org, Kukjin Kim , NXP Linux Team , linux-input@vger.kernel.org, Len Brown , Michael Hennerich , linux-pm@vger.kernel.org, Sascha Hauer , Sylvain Lemieux , Henrique de Moraes Holschuh , Vladimir Zapolskiy , Hans de Goede , Lars-Peter Clausen , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Barry Song , Ferruh Yigit , Patrik Fimml , patches@opensource.cirrus.com, "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, Thierry Reding , Sangwon Jee , Pengutronix Kernel Team , Hartmut Knaack , Shawn Guo , Jonathan Cameron Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 06, 2020 at 06:12:49PM -0700, Dmitry Torokhov wrote: > On Tue, Oct 06, 2020 at 06:11:02PM -0700, Dmitry Torokhov wrote: > > On Tue, Oct 06, 2020 at 03:04:28PM +0200, Andrzej Pietrasiewicz wrote: > > > Hi Dmitry, > > > = > > > W dniu 05.10.2020 o=A020:10, Dmitry Torokhov pisze: > > > > Hi Andrzej, > > > > = > > > > On Mon, Jun 08, 2020 at 01:22:11PM +0200, Andrzej Pietrasiewicz wro= te: > > > > > @@ -284,8 +284,11 @@ static int input_get_disposition(struct inpu= t_dev *dev, > > > > > case EV_KEY: > > > > > if (is_event_supported(code, dev->keybit, KEY_MAX)) { > > > > > - /* auto-repeat bypasses state updates */ > > > > > - if (value =3D=3D 2) { > > > > > + /* > > > > > + * auto-repeat bypasses state updates but repeat > > > > > + * events are ignored if the key is not pressed > > > > > + */ > > > > > + if (value =3D=3D 2 && test_bit(code, dev->key)) { > > > > > disposition =3D INPUT_PASS_TO_HANDLERS; > > > > > break; > > > > > } > > > > = > > > > Is this chunk really part of inhibit support? I'd think we cancel > > > > autorepeat timer when we are releasing a key, no? > > > > = > > > = > > > When I look at it now it seems to me the chunk might be redundant. > > > But let me explain what I had in mind when adding it. > > > = > > > It is a matter of what we do with input events generated while a > > > device is inhibited. If ->open()/->close() are not provided by the > > > driver then inhibiting amounts to merely ignoring input events from > > > a device while it remains active. What else can you do if the driver > > > does not provide a method to prepare the device for generating events/ > > > to stop generating events? > > > = > > > In this special case a user might trigger a repeated event while the > > > device is inhibited, then the user keeps holding the key down and the > > > device is uninhibited. Do we pass anything to handlers then? > > > = > > > In my opinion we should not. Such an event is "illegal" in a sense th= at it > > > was generated at a time when nobody wanted any events from the device. > > > Hence the test to let only those auto-repeat events through for which > > > a key is actually pressed. > > > = > > > However, what I see now is that if a device is inhibited, no key > > > will ever reach neither the "1" nor "2" state because of the "if" > > > in the very beginning of input_handle_event(). > > = > > OK, then let's drop it for now. We can revisit if we see that a problem. > = > And by that I mean that I will drop it myself, no need to resend. I will > be applying this shortly. Well, "shortly" was just a tad optimistic, but I did apply it ;) Thanks. -- = Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel