Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp385698pxb; Tue, 15 Feb 2022 16:09:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzC+HGKiVPXDZO1JzcbNgcHz3v4bz29Ox8Clx0tDLaZU4dYa8c9o6blG8PgDkqbNUpP0zLc X-Received: by 2002:a62:830e:0:b0:4c9:25cb:e1e with SMTP id h14-20020a62830e000000b004c925cb0e1emr507692pfe.42.1644970167308; Tue, 15 Feb 2022 16:09:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644970167; cv=none; d=google.com; s=arc-20160816; b=HXDhFMa7f83jhE/S1fEIKsgp3y21dEkdyyBaHmgCoHMyv0beLjZS/Gd4OV1MVcUSGg Kd6oezt8ZcRBRqGkex7FevA3u22msJTvMxkpX4Hr+iYm4TidswI1q7d8zPqUH3x/hWTE EpdXnk3PMiDVQwCPw14o3r7061EPjNQTruBstKbWzAy7CkkwzyZ76I/+GBYP19de+PZM /Q+XOlrB8c4Y72Qd/vkWbQjOl1gRcsxrmfRyEJeuGO4eY5CUT7cT/VMHdQ1C159KktXm mO8xVL50WJ60xKzgwwBXaHIk6JfKd0UU044G0z6MzQXF19xR0wWlpNLMuFci9hOzCUL+ +A8A== 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=F1oWoUo/Pz47AF3QhLhNS8GxP6K0OhjZso/PODj3rEA=; b=QQU0Pr7QvD5PJah0o3+4ZjemmyG2jvhXCPfj0G4RBXY2EO64mGcAAJFhhXvwjFKgyr sKzb2KaMAz49fNV9CwMTSJqN/bbJtV8Cq57oyl/K+IhD59XSFnklwrcxQufdDH88y5d9 GgYac+Er7AWk4p80k9B+iCZr+MLEI7OvviBsFl1oqYqmcTvTE4MwiMQTMHJW6A71LjmR b3VVD6dg3hBCvMD4/bwXDUkLzwXaaL0ta7l/7OZIQqR8v2nuRBzg/9+nzk1h/o0/TcM9 6B939HEpSyD7G+hB301SZ6V7JkKK9yHcrSD5W04VGFupIQQPgSe3ufNrPP0FB/16Q/Bo NBeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oA2SdCzB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3si19432598plg.345.2022.02.15.16.09.10; Tue, 15 Feb 2022 16:09:27 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oA2SdCzB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244673AbiBOW4j (ORCPT + 99 others); Tue, 15 Feb 2022 17:56:39 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235253AbiBOW4i (ORCPT ); Tue, 15 Feb 2022 17:56:38 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B80F866AC9; Tue, 15 Feb 2022 14:56:26 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id l73so366828pge.11; Tue, 15 Feb 2022 14:56:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=F1oWoUo/Pz47AF3QhLhNS8GxP6K0OhjZso/PODj3rEA=; b=oA2SdCzBou6WlDc+wFi3Ojp9YyUq1aopMs9fn0pc//eCouP73Vuva76ZdR0AFPlv2L 7vim92sLGeXAHMe0t1eg5veqSVy278GeaYBQGTXFZE8VLuOoulJc0SJ+vG/mzpuzH/Pn YJdufdaHzj+OWAlb7iybv0WTnf1YyEBW6oM2Rs0EKKC/kbp1C4sETQzEBEz3SN9jd4+7 azZPmhH1fnnerX7/x/om93bjgg/iC9Qal7SXEI6XZR+W8C+XfFNcK60Pso8g2HJEO3ew H/f7omVdO8Prix3AA8s7m8egOfSb8Ui2qp4i9H2qdz0T9ZnPJQC78mqMYKPOVYV6rGMg KRmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F1oWoUo/Pz47AF3QhLhNS8GxP6K0OhjZso/PODj3rEA=; b=jTrHX5CPG+r5bKv6gdaab6jfbk+JItmviGyeOF8XuFC/KqdrJQ0TP0V9sQofJ6/sas +lGAFVzyaxMKsjw/lW6F0GO2f3M9wVkB/GcioDM9/ntDMXqR5R+mSLg87UV/QV/bizXy mPQSs6iH1nz8jP/d/OZYZaDrAw/YJlYaltdCxhpP//Dl8hXBmYF8muMnKYwC2qsKVfPk DatXjBCay89kwISalPu0kr5EuJC3dQfJY99R0rt9ND7MUeayHdIzwmJQ8c8Dur2VZbjo 2eafJhBXEoQ1MlSiESXvDt5A0LXmoStMWj8goO23NxqmSQW+M1WA7ZcVnfn8oMqxAhcM oeRw== X-Gm-Message-State: AOAM532V5m7VEWfzSd2VSr4emiCWIKbqZedYGVvEwkVHrz0ycs01CAiL +JSA1+2wgc5bovGt7G46Ijyq8qEaHUg= X-Received: by 2002:a65:52cc:: with SMTP id z12mr933070pgp.532.1644965786057; Tue, 15 Feb 2022 14:56:26 -0800 (PST) Received: from google.com ([2620:15c:202:201:4e4a:b0ff:e926:40e2]) by smtp.gmail.com with ESMTPSA id m25sm3697536pgv.4.2022.02.15.14.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 14:56:25 -0800 (PST) Date: Tue, 15 Feb 2022 14:56:22 -0800 From: Dmitry Torokhov To: Danilo Krummrich Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linus.walleij@linaro.org Subject: Re: ps2-gpio: use ktime for IRQ timekeeping Message-ID: References: <20220215160208.34826-1-danilokrummrich@dk-develop.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220215160208.34826-1-danilokrummrich@dk-develop.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Tue, Feb 15, 2022 at 05:02:04PM +0100, Danilo Krummrich wrote: > Changes since v1 > ================ > - add patch to refactor struct ps2_gpio_data for clear separation between > RX and TX > - make all variables for IRQ timekeeping per-port and initialize them in > ps2_gpio_open() > > 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. > > Danilo Krummrich (4): > input: ps2-gpio: refactor struct ps2_gpio_data > input: ps2-gpio: use ktime for IRQ timekeeping > input: ps2-gpio: remove tx timeout from ps2_gpio_irq_tx() > input: ps2-gpio: don't send rx data before the stop bit > > drivers/input/serio/ps2-gpio.c | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------ > 1 file changed, 116 insertions(+), 64 deletions(-) Applied the lot, thank you. -- Dmitry