Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3109653pxb; Sun, 3 Oct 2021 15:36:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRqbGoyKKTQsJYh0NQP1dudRbXHJPkZH6nyKcw6bCKpGOYoeVw7e/HAqwrYNBfOiejE00t X-Received: by 2002:a17:906:b14d:: with SMTP id bt13mr13105158ejb.39.1633300587909; Sun, 03 Oct 2021 15:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633300587; cv=none; d=google.com; s=arc-20160816; b=paEY8H2So5cJfJoGEiFHHPM/3jQmUR4BtcMi1BM0i2J0OVdV68oC5Qn3O9TQT2k3Kg JeNky4uWwK9kc65hvG0LwNfDNMZt61t494Awj27FD1sukTXEbsDdiih4EL32FLKqF6Gh GHNieQ7oJz/ikG3KJCeW4XUwJ2NF2eEsjIibw+dLcJoGiPhgkOza2cCEKHZWGAepCjWo T1MlK9SNNNAo4mgfo9p3C7aQH0szzjbnfovl8zZvD4mvuf38u2NUyIZL3f6Uxt4gMB7u kf5X3RftEOnXIRkzn/z3gi7z11eztx8OSW+mjNsdwHpGqKt111fRCAxwBbVCHLWWkQz/ jROQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bbZ8owU4QzLAqnCanW0nVCBDjaAKFcd+haR1u53mZxo=; b=tv14dkmUyAebaPeOnFAcgY4xDd6Zp27WX9dIepqOmWkVpOGX040mgRvbD/Arv2oIJq gQec7DRDJaaJN3LN+z6+9tZP/dfZMcZ90dnjEzVHMPlbgv6cvPDkN0gxPmbANsU8gGUu KMba/QLEZzzUyoOrXwBCzVI/o6vYRdYrRSz2jH5jr8rMYwoWGRnZjNHnWdh4hgnSIBH9 l0Jw9a0+ygpvLaRxJtYDdopL5HFt/9uXnDknSGotq7RArk8h6xZ6yRNTOadDQn7WhOvz tAM1ThsoeY3KOpzhunuWS23+pDKDMFT8YdHiEAM9RFBPLAn4OyMJc1eb/KE2B8sQD65c p4RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oFaTwE5z; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si18315737edm.398.2021.10.03.15.35.52; Sun, 03 Oct 2021 15:36:27 -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=@linaro.org header.s=google header.b=oFaTwE5z; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231809AbhJCWBQ (ORCPT + 99 others); Sun, 3 Oct 2021 18:01:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231583AbhJCWBO (ORCPT ); Sun, 3 Oct 2021 18:01:14 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C772CC061783 for ; Sun, 3 Oct 2021 14:59:20 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id x27so63523704lfu.5 for ; Sun, 03 Oct 2021 14:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bbZ8owU4QzLAqnCanW0nVCBDjaAKFcd+haR1u53mZxo=; b=oFaTwE5zeVG0+n6KGHulHMvwJzZ3781+WF2XtvkhlepwAM5J5wUMTTQiSFugBdL70q d8XK6BO+dlbewNQwEAKa21QiEpFWi6coUT/5fOXHCo3VoD26bp11NUzTNovETNjQlNvI YTK2D9Tu5qj6oR1RROuHR4I3Cu+6YB8eHnvoOWINbvsTWtpAhH9GcPd4u53CyGdcOfuV mCnlKZ7Npq98YgLDMJ99Dt7PVAY0o5YXQ7z5V+/NlnAZwMT4kUkavSzX4OgrAEa+KHJy /wPm0ZMN8h3JxUZR4bhxm5djIk8uGlQE77AjOmQAAaYqQyOC+SOA7H8AR0mpHtnubzfQ jYAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bbZ8owU4QzLAqnCanW0nVCBDjaAKFcd+haR1u53mZxo=; b=3f4lBBf/yMokisy2oxJnqMdQDjHXlNLjLKOJ83Ui+Y+n1AbatEPEzSEjVGcOjCngo2 KHF8Tp6x7B1IZbshdYxsjQfQrlYT5fVfONLUpcZn1r1U5P4rsZaCvgj3GllAi8PLnOx9 ckTNp4xtDz8TJcFXjSdiEfPu8N1OrJ9VhNWmhPQLo1cdGCAZa5h4AQNuw4cBON92e2HD yodlcP+DXr5XzBazxdwy8n6W3e4LIwZ7QaaGm2AuBSSa2eYKHAhW+F+c+hCufgdlGifv P7a97sAIc0VBAF6lsLiEd6lklZX4sX3VyaKOmSsuIi6JRK9HrDm16/OxqPbsSUPgmc0Y agUA== X-Gm-Message-State: AOAM531O3Sz/OQtPo69EA3PecUfpmERcyNUjvdIH1KyX5l56jwgBStFP 66JEy5PP+zmmb1FNet8fDpw5C9uFzNUHkMhJUfG0GEZAxbw= X-Received: by 2002:a2e:4e11:: with SMTP id c17mr11617702ljb.19.1633298358986; Sun, 03 Oct 2021 14:59:18 -0700 (PDT) MIME-Version: 1.0 References: <20210930232617.6396-1-dipenp@nvidia.com> <20210930232617.6396-9-dipenp@nvidia.com> In-Reply-To: <20210930232617.6396-9-dipenp@nvidia.com> From: Linus Walleij Date: Sun, 3 Oct 2021 23:59:08 +0200 Message-ID: Subject: Re: [RFC v2 08/11] gpiolib: cdev: Add hardware timestamp clock type To: Dipen Patel Cc: "thierry.reding@gmail.com" , Jon Hunter , linux-kernel , linux-tegra , "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski , Kent Gibson , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Doc Mailing List , Rob Herring Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 1, 2021 at 1:26 AM Dipen Patel wrote: > This patch adds new clock type for the GPIO controller which can > timestamp gpio lines in realtime using hardware means. To expose such > functionalities to the userspace, code has been added in this patch > where during line create call, it checks for new clock type and if > requested, calls hardware timestamp related API from gpiolib.c. > During line change event, the HTE subsystem pushes timestamp data > through callbacks. > > Signed-off-by: Dipen Patel > --- > Changes in v2: > - Added hte_dir and static structure hte_ts_desc. > - Added callbacks which get invoked by HTE when new data is available. > - Better use of hte_dir and seq from hte_ts_desc. > - Modified sw debounce function to accommodate hardware timestamping. This looks pretty much like I imagined it would, good work! I am a bit busy now and unable to do an in-depth review (brain parse the code and make sure all is sane) but it looks really good, so at least I can say: Acked-by: Linus Walleij Yours, Linus Walleij