Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1769764ybn; Thu, 26 Sep 2019 01:50:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxT3tde3lGUvWyNjJpzO/fTO3MOOUCBuf+zGlhxVGrZIUS1u2w8aoD7k5IURHeTBMcMDnwF X-Received: by 2002:a17:906:6994:: with SMTP id i20mr2038232ejr.239.1569487853499; Thu, 26 Sep 2019 01:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569487853; cv=none; d=google.com; s=arc-20160816; b=WL0zJObEY1CW9lObwcGlUHbumU17K7f1Qy0+gF/mvy42ZxGvvaIPLgSbUFEI0b4OF5 2DDizBpZDEJQgAMUjCGbf6vqNY32YmnmTA67kAQgxo1sKlQKoWjzW075k4RI3UnGKEN8 TqdZM0Y7eszqT6AAGBxRbPQhu2FRW3MILXJneMoi1BXRKcInYztHgZSRhNscL690+5C1 uj1nXg+gH2aaSh5TPc5PSb04NmGp1EZtkkFb+UP4Y9SqC+DCSx4TjR2dyr2UUuNv5soX fBtr6UeDxXcwVcSObBxC9MckK28SCv1dO34bhbYLH7pPZTBjnpnAgp35Q5p3zRLZZKmf MegQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=qealZ1CZJ28LFym9izsbAU3jf0E36SQ5sD41myrx0hk=; b=XfBKFdH5TYatc3WhG/1VtCmfiTMfWMvSXWKBa5ILXPidYdS0DRMd9z6yT6OnuG2tRC tMTX9XAGlG3H+TXsL/ADi4qDpMBEvYXwUwXWe2R1nuZHEzUMCOS2CwHl1RbulcHKljy3 Kh9wHVOWVuLufomVLmF8t3gZ4k6f/s1csjvHJXBw9x9UAgveZ4uBIFHAwDTkzPvfrMYC d4aQVwppCFQ0yj/WwfEgTd8q54Sj6Vb9dUhv6hAVKZYmG0KkqYAZ+s3c3pIdrRqBV4CH e7tbOIsPWlJpgFpv02VKcjOwUFzTc5fpuG81NHh8+ebgRPeqsjl6IXIXbAOn0KyDvyZ/ H4Sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c48si908111edc.169.2019.09.26.01.50.30; Thu, 26 Sep 2019 01:50:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410754AbfIXVQH convert rfc822-to-8bit (ORCPT + 99 others); Tue, 24 Sep 2019 17:16:07 -0400 Received: from mga02.intel.com ([134.134.136.20]:32964 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410672AbfIXVQH (ORCPT ); Tue, 24 Sep 2019 17:16:07 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2019 14:16:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,545,1559545200"; d="scan'208";a="189483403" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by fmsmga007.fm.intel.com with ESMTP; 24 Sep 2019 14:16:06 -0700 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 24 Sep 2019 14:16:06 -0700 Received: from orsmsx121.amr.corp.intel.com ([169.254.10.190]) by ORSMSX116.amr.corp.intel.com ([169.254.7.232]) with mapi id 14.03.0439.000; Tue, 24 Sep 2019 14:16:05 -0700 From: "Keller, Jacob E" To: "Hall, Christopher S" , Felipe Balbi , Richard Cochran CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v4 2/2] PTP: add support for one-shot output Thread-Topic: [PATCH v4 2/2] PTP: add support for one-shot output Thread-Index: AQHVaGiJVAygg13ZgEaRBcEK9JTjfKc7SaLQgACGwQD//5gpUA== Date: Tue, 24 Sep 2019 21:16:05 +0000 Message-ID: <02874ECE860811409154E81DA85FBB58968D3696@ORSMSX121.amr.corp.intel.com> References: <20190911061622.774006-1-felipe.balbi@linux.intel.com> <20190911061622.774006-2-felipe.balbi@linux.intel.com> <02874ECE860811409154E81DA85FBB58968D24E2@ORSMSX121.amr.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDE2ZmE1ZmEtNGUzYS00NmYwLWJlNmItMmY5NDk3MWI3NzdhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMU9zdnY5ZXBRSFdkcnByV0R5aFFkNHJCWTNBY0dmSEFzXC9yUHlTSnV1WVwvVlwvZm9SdnlON2srODFaRE1CM3czQyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.22.254.140] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Hall, Christopher S > Sent: Tuesday, September 24, 2019 1:24 PM > To: Keller, Jacob E ; Felipe Balbi > ; Richard Cochran > Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH v4 2/2] PTP: add support for one-shot output > > Good catch on the terminology. This is an API that produces edges not pulses. > This flag causes the PEROUT ioctl to ignore the period argument and produce a > single edge. Currently, the igb driver implements the same function, but uses > a "magic" invalid period specification to signal that the period argument > should be ignored (use_freq == 0): > > if (on && ((ns <= 70000000LL) || (ns == 125000000LL) || > (ns == 250000000LL) || (ns == 500000000LL))) { > if (ns < 8LL) > return -EINVAL; > use_freq = 1; > } From my understanding, the use_freq = 0 is intended to perform a clock using the target time registers with an interrupt to re-trigger the next toggle. If you use a frequency not supported by freqout, it will result in an interrupt that re-toggles the target time, not a single edge. > > The proposal is to support this function without magic period specifications > using an explicit flag instead. An example use case is pulse-per-second > output. While PPS is periodic, time-aware GPIO is driven by (an > unadjustable) Always Running Timer (ART). It's necessary to schedule each > edge in software to produce PPS synced with system time. > > Chris Oh, so "one shot" will simply toggle the clock output once. I see. So this won't really work for generating a pulse per second, and we would possibly still want an API for that? Thanks, Jake