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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CAFAC433F5 for ; Fri, 11 Feb 2022 21:23:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353659AbiBKVXL (ORCPT ); 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 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.