Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5799667pxb; Mon, 14 Feb 2022 07:55:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXjHwBpOTlMhjsd2170goy+/cYFoDBAZE8xUP2Qsr3Vj5YQPcyFkUNRQKRmnrPtEvoOFpv X-Received: by 2002:a17:90b:1954:: with SMTP id nk20mr307634pjb.187.1644854134445; Mon, 14 Feb 2022 07:55:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644854134; cv=none; d=google.com; s=arc-20160816; b=XKEnTIsvp8qwWsAo7WuZVe1QPt8qJqpPaDdx++SDokaS+Y2IMSCWt9oj8z4JjjVWrV D5UDqa1QjaA0rZG96fuPBMyKIOb+w17vTJS02WWpqseMcHysfPuNt/6aE6N3jaFJBukd tf5sFUgAN+PJknpJdhc9afcQXzZdCY259X5SbpxB8UwdHGXsivhf9vRXnXXUjo5ptn4S hNOPVrVwpKArEwOj5qvkP8QDuZMN3HlULbLRpeS6Iklj5uDoxmbpjt6cKPmyw5aDVGmz b6Hor8bFncbboMTYHPeQ7S7zrBJj+keIYJWtVWuFzoQEFOyY+EZE2TTG7o3kihK6d5lS ZcqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7JETx7wArDwKC0DnYfwT4s0uF6cTaXeByss+judyF3M=; b=c+KYf1ugpo5T7lwYtRTsAl7O5S82ofMf5PjYMkC80MJ5T7QT7/tBi6wKdufmDoq8J0 9AmPTIt6/tTeGhCECPzxclE6etLvo7U3T1XAM8EU3xy2vr9vWzQ1bYBSDi/Q2tjO/zHj U87ULZrY0btcK/WrqhNCGJsWO4fbQ5nNoUKl4777XdzI7wh/QtggdeCGfXTmHVhkq03r /koq/cnF5VPhMPkpgLuu1tj9LCQBCHEM6FOPcw8nK+FV5mfNkUH3FmgXjQ6G1WWgWql1 AbQ2i/Wy6hgnxJDFpkM9gpI1hvP364UWj1ywdZqCrXcfWm/jmvG+cBZ/tD3yqhgcGUpu vWPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1si1274699pjg.103.2022.02.14.07.55.19; Mon, 14 Feb 2022 07:55:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353648AbiBKVXL (ORCPT + 93 others); Fri, 11 Feb 2022 16:23:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234098AbiBKVXJ (ORCPT ); Fri, 11 Feb 2022 16:23:09 -0500 Received: from hs01.dk-develop.de (hs01.dk-develop.de [IPv6:2a02:c207:3002:6234::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ABC92E7 for ; Fri, 11 Feb 2022 13:23:07 -0800 (PST) From: Danilo Krummrich To: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org Subject: input: ps2-gpio: use ktime for IRQ timekeeping Date: Fri, 11 Feb 2022 22:22:55 +0100 Message-Id: <20220211212258.80345-1-danilokrummrich@dk-develop.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series implements the usage of ktime for IRQ timekeeping to overcome: (1) The resolution limitations of jiffies. (2) Potential spurious IRQs generated by gpio controllers. Besides that, based on the newly implemented timekeeping, it fixes a wrongly suspected extra clock cycle for TX transfers and a race condition when starting an immediate TX transfer based on data received from an RX transfer.