From patchwork Sun Jun 25 14:21:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Farber, Eliav" X-Patchwork-Id: 11267 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp6968233vqr; Sun, 25 Jun 2023 08:21:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4EzoOZaHFeCschhyWfOy7ZbPQrfwJWLZbuwMbNmp6YpALPR0MGGBQ4e2+uJ8csNiO+H9VJ X-Received: by 2002:a17:907:7ba5:b0:973:fd02:a41f with SMTP id ne37-20020a1709077ba500b00973fd02a41fmr26820001ejc.40.1687706496003; Sun, 25 Jun 2023 08:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687706495; cv=none; d=google.com; s=arc-20160816; b=aPdr1dPYm+9AsVafVOMw40PvzO2rHOL4VdcFcs0BfOfZZfwAng8pCtYgyrCoKcnoaH dV7lYBiQy+6o7aV4IVWubl/nttdqH+dC7kcAEoAFekZq8E8XWlkacFCkJw07pEqpFX8R 67RDc2xHT4jcnYmBrt/CEG0pqcJmCStNblPOhrjIByB4EztBTMRlhjMHIjceJQ2PuWb6 mDdjsqVR66MA8QkMoQy/vjScII3jhC4qv/3Acxy6ySiKCzp6YC6gjTtxE7mLir8e32BF H+WUBKHwqVrhrmSjf+TZ/fqOXK05J+5wYSKj1Jj+tJPfbLicktQaPXqn0cfmCvOST/WM oY2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Z0bWCCK3xYF6EpWbniz5Yge0ki9KXt6nvRJYKV/3Rq4=; fh=/9rTqK0zswNCgLim86exJ2HNVgKWrjH8Cr/T0xC8qdo=; b=wEoxeakbUJuPzwH72ZekrYads0muxLeVFPwSyABplvKu97CzdiuVjcdamQy3KS4XxW yrpK82+YgbWk1L0sFmsdMT+4TTWP4z0gknmeFOJkkYLxIQ9MKnflbzbF22X6OjN5ANTR PmXYOLA7jO02ADRLR+4RXqcg/+iOIOmBm/2TgVphAKqlGDxaafqdGbc7ZpQvujduI4Et AgVKDkmj/gytt7mRJVnH+PhdvKLiIv0mq6NVvirWy5s96LRn+eJzPRwGeuCLWkn+6Rdu 3+8gZhs83F8KvVf97tK3nzMyJCUmBBxAejJmeEEFKwCCLgISN1lqqRaQD/rIB6z/o36g 300A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=iaRxI7Xe; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a2-20020a1709065f8200b0098867fad438si2002262eju.479.2023.06.25.08.21.12; Sun, 25 Jun 2023 08:21:35 -0700 (PDT) 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=@amazon.com header.s=amazon201209 header.b=iaRxI7Xe; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230411AbjFYOV4 (ORCPT + 99 others); Sun, 25 Jun 2023 10:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230349AbjFYOVp (ORCPT ); Sun, 25 Jun 2023 10:21:45 -0400 Received: from smtp-fw-33001.amazon.com (smtp-fw-33001.amazon.com [207.171.190.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82EE8E4E; Sun, 25 Jun 2023 07:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1687702905; x=1719238905; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Z0bWCCK3xYF6EpWbniz5Yge0ki9KXt6nvRJYKV/3Rq4=; b=iaRxI7XeSdnjdK5umwNZRIoEaIEo4k0nTV0xdKjjVETmEbv1FwjTJg2+ di87iTDby8DL2uydTbb/JuR6fW/HJVa+BLcCmOBhBdWNNhhQ+g55wjhSo UwHuPsJmHaGJ9RMd+S9HGS85/kh+ikWNkeqwotyUYDStprvwBrbChsmRc U=; X-IronPort-AV: E=Sophos;i="6.01,157,1684800000"; d="scan'208";a="292748461" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-2b-m6i4x-f253a3a3.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-33001.sea14.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2023 14:21:39 +0000 Received: from EX19D018EUA004.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2b-m6i4x-f253a3a3.us-west-2.amazon.com (Postfix) with ESMTPS id 89260806BE; Sun, 25 Jun 2023 14:21:36 +0000 (UTC) Received: from EX19D037EUB003.ant.amazon.com (10.252.61.119) by EX19D018EUA004.ant.amazon.com (10.252.50.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Sun, 25 Jun 2023 14:21:34 +0000 Received: from EX19MTAUEB001.ant.amazon.com (10.252.135.35) by EX19D037EUB003.ant.amazon.com (10.252.61.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Sun, 25 Jun 2023 14:21:34 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.252.135.35) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Sun, 25 Jun 2023 14:21:34 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id 0F7554AF4; Sun, 25 Jun 2023 14:21:34 +0000 (UTC) From: Eliav Farber To: , , , , , , CC: , , , , , , , Subject: [PATCH 0/5] Add PPS pulse-width support Date: Sun, 25 Jun 2023 14:21:29 +0000 Message-ID: <20230625142134.33690-1-farbere@amazon.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769688526601290465?= X-GMAIL-MSGID: =?utf-8?q?1769688526601290465?= This series of five patches adds pulse-width calculation support to the pps core (patch 1) It then enables pulse-width calculation for the pps-gpio driver (patches 2 - 5). *) Pulse-width in measured in nano seconds. *) Width time can be calculated for both assert-time and reset-time. *) New sysfs were added to expose the pulse-width. *) Support was added to pps-gpio driver to enable capture-clear based on device-tree. *) Enabling pulse-width calculation for pps-gpio driver is done based on new boolean device-tree properties. Eliav Farber (5): pps: add pulse-width calculation in nsec dt-bindings: pps: pps-gpio: introduce capture-clear property pps: clients: gpio: add option to set capture-clear from device-tree dt-bindings: pps: pps-gpio: introduce pulse-width properties pps: clients: gpio: enable pps pulse-width calculations based on device-tree .../devicetree/bindings/pps/pps-gpio.txt | 10 ++++ drivers/pps/clients/pps-gpio.c | 15 ++++++ drivers/pps/kapi.c | 49 +++++++++++++++++++ drivers/pps/pps.c | 9 ++++ drivers/pps/sysfs.c | 30 ++++++++++++ include/linux/pps_kernel.h | 3 ++ include/uapi/linux/pps.h | 19 +++++++ 7 files changed, 135 insertions(+)