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=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 8B742C46466 for ; Wed, 7 Oct 2020 01:14:21 +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 1397A207EA for ; Wed, 7 Oct 2020 01:14:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SyfqyOVn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BZ5McIJk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1397A207EA 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=LJDnF6GE88JjuibS8uBV+F2jnJUD37RltRJmxWEjkz4=; b=SyfqyOVnNsjlzOXXeB+i0jo8f 1qIRRninoc7+4SFSR0QkN4EBeQdncViWFm5fWdZHxxc74tIQBVNXpBsT+N5s9S/Z3JFWcYU9AJ2K1 4mEdWV/oFIMgnUP0ojlZGaRPF4HSeHcugwP+ziw7ao6vGEhMJU/H5oJLlNJ1euySKLGWEAqrnm4/u 7jaTUdmOjnLKR2zk25CN+050DeCe4gqrEodK7KeDoPXyBFsu/xPtZ2E1uz3JeFmDAwuOLIIm6r9Vt fXS8s4f1QHKYrXgkMnGm5+7OWx9FODBFnFbTfYneGWR3hCJaTQcFgBNCwexV95lfBYld8c/KYict7 k7YNSgdcw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPy0o-000715-DZ; Wed, 07 Oct 2020 01:12:58 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPy0m-00070D-8o for linux-arm-kernel@lists.infradead.org; Wed, 07 Oct 2020 01:12:56 +0000 Received: by mail-pl1-x644.google.com with SMTP id o8so161886pll.4 for ; Tue, 06 Oct 2020 18:12:55 -0700 (PDT) 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=mhoMukFtXUDnoxYBeSc1gCnHDJjh2RBWkCrpacxBvgc=; b=BZ5McIJk7M9QpLpb5KoCQkdxJYiPrNQhgs5cl4vLLWytK5VF9kyh4DJe1g7PqgOdHJ vi9SNcnbS6RVeKxhRm1gfXYW/1MobIU3emLb+keannjof0F62HLir3wvH+3R+JnKfDDw hUuIq3r2W7hYuJwomu2PHIw9cHJh2bCarSSmPf2vcxlwhVYPy1B59pQCZh88VJfxM+SH P3U1OKhTrqq3QQBPtMpZx/3RzdSMWOBjkBQktmI99bmH+2SMTqoB4KKC16f0DxyVah5V LrrH+r9brZLGlfmZ2vd2w1S9l0EWtUIDgohzA1Ws4rcazlyeai7Bzg+4oBQf9+qgFD1f D10A== 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=mhoMukFtXUDnoxYBeSc1gCnHDJjh2RBWkCrpacxBvgc=; b=edCKymj7PNxxlu8X9lc/joiQrQp0z4mhV8BW5Rp02SlFcK6g+OAkIXtD1RS0JZvRfy Tp6un7V6KucbZLBHqmmgIT8K8g68x1AFG0xAjQ8rqTbDDUzMSKrfiYkZvkTx7tboOjJe p6HE9B1xA+18aM3V0iEy3iSTkff2q2+FNp12cRN0jJjiiEAQpxXzhoXMxHp3NQlR1dB/ kdJWEDhbApRvvYSxjD7PYiXZacQX7FBvLkHdsRljVV/wPWl6qdD5nkyM56c+8xlueq8j +QgD+RrCO4TjlfdzDu6UN0G34DeLoPwDxN8nCXAFjLZQIKbkBfbshOrpgXDRYG24rtoB FFyw== X-Gm-Message-State: AOAM533y6sUKSMI7X/KiNfdxj7WzjbmzOULZmeyaKIiY0KdCGEMyspCf /DX+otYq9069ZN4tatYTMwA= X-Google-Smtp-Source: ABdhPJy4dLisQACUERV0GxDAYvpdj82oBH4eI0zaGWCX8W7avrgYWVStQLex6A0apJQoB8lnZYPvuA== X-Received: by 2002:a17:90a:1a02:: with SMTP id 2mr708050pjk.201.1602033174099; Tue, 06 Oct 2020 18:12:54 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id f17sm412371pgd.86.2020.10.06.18.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Oct 2020 18:12:53 -0700 (PDT) Date: Tue, 6 Oct 2020 18:12:49 -0700 From: Dmitry Torokhov To: Andrzej Pietrasiewicz Subject: Re: [PATCH v4 7/7] Input: Add "inhibited" property Message-ID: <20201007011249.GS1009802@dtor-ws> 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201007011102.GR1009802@dtor-ws> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201006_211256_321026_211B0C98 X-CRM114-Status: GOOD ( 31.45 ) 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: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 wrote: > > > > @@ -284,8 +284,11 @@ static int input_get_disposition(struct input_= 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 that= 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. Thanks. -- = Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel