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=unavailable 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 E2093C49EAF 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 C5E3A61C2A for ; Sun, 27 Jun 2021 11:38:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229840AbhF0Lks (ORCPT ); Sun, 27 Jun 2021 07:40:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbhF0Lks (ORCPT ); Sun, 27 Jun 2021 07:40:48 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C662C061768 for ; Sun, 27 Jun 2021 04:38:24 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id c16so20377046ljh.0 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=UAQtWuVBzf+ggLHkxlrbAySyZ4kwZsnQcafCp9KbeHBEcuRG9pPNaLFdR35OCl8etV 6a8z8jTq73yPYn4NkaufEaGFoCcP3rsdOGjig95JSjXaGRecqX0oeeH3fo1N95AsoscR nrpvUWQq7DMIVESGJV5K7WJyMOlsTLw886YGT9GpzPuQd6xwTGDUFsaaJpWMyCR8EmrH 9VsO2ww0gxX9mH1W353348L3JqD57tiJ/ljPXECh/ilyaItM72KNUgswchHAvxHNn1TT KHMo0Fo1jEBsXIYJVUC+0POuEcsJtW9rDvI6FDUIu/8W0rsA5TOvrsYBev9p9TMzbJYv D5KQ== X-Gm-Message-State: AOAM532lCkt4HucoV5iONPjIRj4Z9sOiwxLAy0Ej24+mpUxu9QDdLnkd t7sLCd7wmBvgSRBgHmLSMICNAKqTbZuFDncBFt5dpw== 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: devicetree@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