Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4586749pxf; Tue, 23 Mar 2021 14:36:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5by5znSm9dkkZonrwqjs83DFG+kJhP0IyVqu9cgFXZasF87NXvFhZooHRm+RZ/mBP6ydr X-Received: by 2002:a17:906:d8c6:: with SMTP id re6mr209412ejb.311.1616535374941; Tue, 23 Mar 2021 14:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616535374; cv=none; d=google.com; s=arc-20160816; b=VBhNkbtf21+VAKQ7jv8QlqxzdUI1cYRw6Tiyp5koViiaXQbsX6xOk+qHpDuR2W9yVg PBgWEnEZv2R5E4ZP9IozXxnm3jPwoLXmc8WODdZtZB9dlCribmvRb6sa1OYdy8/cyBme 4jkOPl5mKNmMqO5gb9OU3AA54UW7HN+z5ZhfeT6iELGzcPZmIC2DiAVQZd6sxbC6Hzoj O4j26UsNir/u6DCp1xmAXDf96xht7Kj2JOrLUc3/y99U4MBPextVLGwUlKgtmm5KXBIJ ujBAcixBV2+K2iUeShyNdZlFXtsLA1bykm5I855t2hpdpo/YKtZIOiXq24bdG9ov2/Br 6hkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9uLSI7pCauYi75mP6B+G3pQEjSzmPOH6dlya9xeGJqY=; b=jgoKxwVSL7rs0hBLo+RWVsbJ0OzUgclZrAMxwpT0J8IpCXF7FSicFtUNusbFSMJwCh NThXJnBeP6T9SNqORV1ktgpyUJrVkfW2XDfb0Ku1PyNyXVbMuJPEKCYMcNy+sOm1NqO+ jmLcT0PhhEA8G2x9lPXuWWRzIYHL1LxDRdGJ5bqJGtAt68S9HmGNog/Om7P/CiH6q7Q+ B7NE6WpwXzcO+AeIrZ9RL0I200rjGeyKvcwIUUPKqYWQJZpo5hitfMGJM1LkVmUz42Rv d+AH4txu8MBGbjzKj+SX3gDDXqsAJBEb+MKqCqLoFyC1V01CQwvgJFEU/yuD22wfKvpl XuMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="i/sZnzjY"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k12si164400ejq.734.2021.03.23.14.35.49; Tue, 23 Mar 2021 14:36:14 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="i/sZnzjY"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233615AbhCWVds (ORCPT + 99 others); Tue, 23 Mar 2021 17:33:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233564AbhCWVdl (ORCPT ); Tue, 23 Mar 2021 17:33:41 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17526C061574; Tue, 23 Mar 2021 14:33:40 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id h25so13073602pgm.3; Tue, 23 Mar 2021 14:33:40 -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:in-reply-to; bh=9uLSI7pCauYi75mP6B+G3pQEjSzmPOH6dlya9xeGJqY=; b=i/sZnzjYVXP0+mVX1OPKfr3eKHCWZVGzMAwYOby/cIW70xW+OZtdzPvtJMWOYJHApw hEbcipYtoPLGULtt9VRpJHp+aE6ogCCFGAqqlj/U1kaATZeEUxNrJ//BQ8PCUXAhEQc6 UOTOSioL5hZPRPGSm8Fm6kBzCiI0oPfbRANOZ6yLTMeDF64COnhk2OVgXqd5Z1mxJwy7 unoiGudUfljx+7cLIxAF3vN590SovV3hK5h81ZRm/mgSih5yWJ8HF6+GXdDAxIDMenrB V6/OgEI7eyByW62UvWYtcNQrFEhThB9Ykk5eKj0HRCmQn84lyIeLAfJTZqnAhxZQP3Bl i7Hw== 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:in-reply-to; bh=9uLSI7pCauYi75mP6B+G3pQEjSzmPOH6dlya9xeGJqY=; b=T7tFh3jHKK30SwfEy+zLsXb6aRUUKkTAdXrqp9nq5DBUxam1C/sEcuYXyRM2IKpidG Erk1DVUOP5qYM6K3Py5UWkqtq8wge1JCQrIqwKoRU2Y9xJSjJ8sHBGwBfUqgNkaEZcax nPda0WAaTnM7Rtgb8bG6xPRrBJZI93MGCtDbMjKpXTRDWF37EpoTgpojqexSb2MH+Ywt FmGNi4HdzZ+gDXD9n8MRGbsIr7wMERwpijX/XlSX7EV3hyQUrGHJMzpYDXwyUPntRkAg Tz5ZGIQZ7jIf4NEVjtJcP6DHWeHJLnVJ5cF6AHGNyW5IssHaYskIMbGrNm48C+b6yhZP yT2Q== X-Gm-Message-State: AOAM530c/heB+upajTFuhhadJwt8FMyMp48zdUfeKx4f0qxVJ6PWBC5Z pRpynukszSmteaPRK+/AfPc= X-Received: by 2002:a17:902:bd4b:b029:e6:a4a1:9d8b with SMTP id b11-20020a170902bd4bb02900e6a4a19d8bmr300291plx.56.1616535219673; Tue, 23 Mar 2021 14:33:39 -0700 (PDT) Received: from google.com ([2620:15c:202:201:4d6b:ca5a:c720:f5c9]) by smtp.gmail.com with ESMTPSA id z8sm118351pjr.57.2021.03.23.14.33.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 14:33:38 -0700 (PDT) Date: Tue, 23 Mar 2021 14:33:36 -0700 From: Dmitry Torokhov To: Paul Cercueil Cc: od@zcrc.me, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] input: gpio-keys: Use hrtimer for release timer Message-ID: References: <20210307222240.380583-1-paul@crapouillou.net> <20210307222240.380583-2-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210307222240.380583-2-paul@crapouillou.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 07, 2021 at 10:22:39PM +0000, Paul Cercueil wrote: > Dealing with input, timing is important; if the button should be > released in one millisecond, then it should be done in one millisecond > and not a hundred milliseconds. > > Therefore, the standard timer API is not really suitable for this task. > > Convert the gpio-keys driver to use a hrtimer instead of the standard > timer to address this issue. > > Note that by using a hard IRQ for the hrtimer callback, we can get rid > of the spin_lock_irqsave() and spin_unlock_irqrestore(). > > Signed-off-by: Paul Cercueil Applied, thank you. -- Dmitry