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 X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98C6AC48BC2 for ; Sun, 27 Jun 2021 11:38:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73FD161878 for ; Sun, 27 Jun 2021 11:38:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229828AbhF0Lks (ORCPT ); Sun, 27 Jun 2021 07:40:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229820AbhF0Lks (ORCPT ); Sun, 27 Jun 2021 07:40:48 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29B10C061787 for ; Sun, 27 Jun 2021 04:38:24 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id q4so11995309ljp.13 for ; Sun, 27 Jun 2021 04:38:24 -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=pQxWdYWHvbbp+2LcaBtIbSxJfMMlfDTA83HjiKw1VAs=; b=gpCPcR/xeh65GpyTKLghTUCKCBUjZmZjSIw5/3lU3NKaN0qDV3NkoX8cWkQV11nz3B 40OLGXRRT97wWZApV5ufDcq691C0KWtf1RAgH8XW5aVRZQwl1eeEg0DXS3+W2fAT1X5m m+hV9nIbmlXdEFaQN2Ou03/cQE/ayWqb2OdXUvtpJ5TuNplnDcPDJ6QsUknv4ctKXqDq t8ivBcrq7AL1Ayxl34OP8qlhlpAvWs65z5y0bsXzRpvk8qH17qOwtOUgp++z/gVLriRV u+jxcOzu0P0gL88faPMjewy77CjAJEe6iaBoE4TAU0I2NFbOVcs1TJuDXMsIzmidoOLu umAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pQxWdYWHvbbp+2LcaBtIbSxJfMMlfDTA83HjiKw1VAs=; b=SvWk5XMAYtSTTmRvkRtb7vbeKfPCiFeoTK4Zr+cCT+p81W/OCyr0v3J31/LmqzzapG RWVPJfaj4AIeYghk2SVYK5Fvo2xFrDs/FXahhPswwf1F+/Dk70kLTqjfjDASjsibOlNw G7+KULoD0BveZErHxRoE4v4WJrPzytbAOhKw3C16w0MuXRuras8oOUt+wpmOoQ9SYEaA nUQi9BeltqOisXOQ0r6riib6xpqPjQoWD2VP9c/bwh9NMghTJwcGE6WNpNvg96oGyH2Z ZBxW1VfvbBZLEpS8RR2aNy8x/GLqJOs6oheofvG+2JeZY/iu8wKYgUYio4wHxY99G+0m iGrw== X-Gm-Message-State: AOAM5321UTnUZojIK6o9vAo+s0bD4n/70MY0P2x2tZwi/AEiFn3Lf7/a janHO+X8dsLqnhNEsqCfromT/UyIH7UsYIy8y+/5dQ== X-Google-Smtp-Source: ABdhPJz/VCxte05fHrLvpJorkmglZCxD3yh2bBhdMx2Ohc3IjXk204q1B1o2taLMzCkh5u2qTWBzMxJNPZA0eNiYgis= X-Received: by 2002:a2e:9d15:: with SMTP id t21mr15808817lji.200.1624793900993; Sun, 27 Jun 2021 04:38:20 -0700 (PDT) MIME-Version: 1.0 References: <20210625235532.19575-1-dipenp@nvidia.com> <20210625235532.19575-9-dipenp@nvidia.com> In-Reply-To: <20210625235532.19575-9-dipenp@nvidia.com> From: Linus Walleij Date: Sun, 27 Jun 2021 13:38:10 +0200 Message-ID: Subject: Re: [RFC 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-gpio@vger.kernel.org On Sat, Jun 26, 2021 at 1:48 AM Dipen Patel wrote: > This patch adds new clock type for the GPIO controller which can > timestamp gpio lines 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, it retrieves timestamp in nano seconds by > calling gpiod_get_hw_timestamp API from gpiolib.c. At the line release, > it disables this functionality by calling gpiod_hw_timestamp_control. > > Signed-off-by: Dipen Patel This looks good to me, pretty much exactly as I imagine it should be done, and it is also nice that we only implement it for the v2 UAPI. Yours, Linus Walleij