Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2648621pxv; Sun, 27 Jun 2021 04:41:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbL/Z56477XEvc6sNybNXxCg8JRdjuPMT7EVyC3y3Mbv3hi+jqhHzn0iCCsabcV0NVv65U X-Received: by 2002:a17:906:c302:: with SMTP id s2mr19461853ejz.151.1624794104876; Sun, 27 Jun 2021 04:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624794104; cv=none; d=google.com; s=arc-20160816; b=Re6/PtdauJPiuaDlz0KPZ3xpnmLJdDKaL0E56UPZj3MYgSHNB2XypRxQ8D0uLYHPjR 9hNT89KuemIE6U20Xl/DA5iwucRkEVbqC+IFkaNmQx8/t81qeemABxLCVZMV+9iuSf7V Mg1QX6+Xh+5FHklaS0q1errF+12R8Ue1Wccg5ShZ2zDHfDMsGWKlMyXXIAxuHV6VgZca kQsKE5+XkN83v+TkVoi7V9jCXIXCTVo1gkvMTvu2O5j4b1YDukgpLBcS94U4w1HEdVvj 8tGphdpHu/Ue/sz1kIxYKR0LXCAlbvfAI4ORUAyOjTd9M14qgYBU9X/LLTK8CWqN0v/l cOKA== 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=pQxWdYWHvbbp+2LcaBtIbSxJfMMlfDTA83HjiKw1VAs=; b=Zm41J2vAJbYSrCWkdxjCn1j9Kcahh3FEwk1yyyTW0TPCKHeHoaJKXhdMBsp+taDI4C 2WIveqxEPceyk/1c3jYa2exyo+a+q8JzcK0RlbuV8Q8OY+dNFqSc9sbMSTy5o4tbLHmS dqG/umTKNGkuo+Zru+9XRhjr5Pljg0sowzuqJNFntHnfkyhozU16cdLOfMyGFDakIOwa b5xWc3CHjhwPCXu3fXvRH0/JcCDcgYEE2Ek9FVyOV5QBzzFKhauQcOOGuAyb8epfRuDM DqrXP8n1EhSvPP1OdYU8SMKoboUMy7xQQkANDeKCADm3DyxOnYecwX+xzGyewuOa2zxz 7VDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gpCPcR/x"; 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 s28si6553040edy.384.2021.06.27.04.41.21; Sun, 27 Jun 2021 04:41:44 -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="gpCPcR/x"; 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 S230112AbhF0Lkt (ORCPT + 99 others); Sun, 27 Jun 2021 07:40:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbhF0Lkt (ORCPT ); Sun, 27 Jun 2021 07:40:49 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EF20C061766 for ; Sun, 27 Jun 2021 04:38:24 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id k8so20368185lja.4 for ; Sun, 27 Jun 2021 04:38:23 -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=Hrc2FXTCUi7oSX3rDVsnV40V9Ftsw/NeTlQBCWsL3HyLUBJe4rslfhI0AD4Wqcn8rb wvBPBGxRveGLZ7uL3X/xrUdpgu/nWNUuGlUGoxS2cSze1n224k75LXE9w75MtbLBzvOX VVsxR3VK7U6RcXLcBU8lN51s+hiU3GbXxOch+xOXzyCHOqMjitMxlm/5tOM+h2nhHxk3 nkUMmqLLHdcGXcHct9Q13X3KxZgxSW1XPfyE2fH8E3WdjVbCb22vQ3OTL9IqFICX4iYA XXA2rIyJLPp0EB4hVzoTalyGbbe4VihxMwMBHll5hNux3+TJWUjNZ7cTkJadkUlTXr+e yO1g== X-Gm-Message-State: AOAM530fdHTSANtXtyej7gazauFfyAZivfMl8R/gjECqmroA0oLd2odE 51mSli62I8qyjLSowNBZiLtvRQpXkvN1yZnV8B+8dA== 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-kernel@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