Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp654137pxb; Wed, 18 Nov 2020 13:37:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSQxtd3OSnOs4hsUbuwGHDvGk18tsIYemw0T28u4jCOzZMNyOQuwfDCTFE7UnOjiimJcyt X-Received: by 2002:aa7:cb4c:: with SMTP id w12mr27690958edt.309.1605735456157; Wed, 18 Nov 2020 13:37:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605735456; cv=none; d=google.com; s=arc-20160816; b=GR0T9Dop5pNWvHomDiGpX9VDR39lnSaahuyujRffe6UfXOB2e1aKcCM4Y+etTrrNVI dZXGjRyPDJJBNes+i8QpYtWPw+9AMbF67MvBwkoisIRuC5z7YFG1tfwy0ezJG1T3olZ0 hY4gosmLyn0Kbf8dYY5m/I7eMPzcn07vIVW8ixG+XnMnR8chqRXW4lm+UrBhLEAM2r1J ksKSbyiPI9SNczEDRUmj6whjN+oAxY6kjb7sR/wMmt9KXpcYRifUeycJYlDK+K8YKsMv vh1YMzZ27PKtELcVd/frL6EgU4v0E4EV8iZ8veaGOcZGbvU4Of9NSOpGS2PHF62Xk374 x5TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=+AfQA4uxbpS27ISbeeE2Zhokc7q5oHipQ4c5w/d2Hrs=; b=ViWGOAij8L2vA2UPBaw/De5mHBN+MoiAdqn2IDZuSzYZdDV96sVUglc3rsvxMr+Tf/ nY3HPqCiu7AQvN1/CAFcH/PGd4sgTROhEepw+i/E3cm0iISSZZP7VDKU6dnxxpjei71E Pw0yA3MI2gSJSbwRscLbSGaNJUdUQVam35uoUMZ+rOmUZ4hC8hUyfCqePyIelF/n5Cb8 6WW6jwo5/WwAFO5Vc9BdJOqUEXjfgSLVKWBuB3wD7HRORvgP07m7OmPrikG/24CpuUtn LwMYSO+wVBhIpd3gIEQM7Zc6UoMLrRVHo2zMgTEIKE2jmuMt+hqvY6KcNOh1CKLyjnXq ZtMA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o24si17789732edq.9.2020.11.18.13.37.09; Wed, 18 Nov 2020 13:37:36 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727017AbgKRVff (ORCPT + 99 others); Wed, 18 Nov 2020 16:35:35 -0500 Received: from mga11.intel.com ([192.55.52.93]:8606 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726766AbgKRVfe (ORCPT ); Wed, 18 Nov 2020 16:35:34 -0500 IronPort-SDR: 4usVwzh5PTJAztVQX2EZ1lKn6fegobUQFrerccFT4qDudYi9rbbld+htVhyDDsF3y3tM/awE0l URm2lC/bC1dg== X-IronPort-AV: E=McAfee;i="6000,8403,9809"; a="167680384" X-IronPort-AV: E=Sophos;i="5.77,488,1596524400"; d="scan'208";a="167680384" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2020 13:35:33 -0800 IronPort-SDR: N7X8KpP5Fb25kRBz6/gO5VM7lB3nVRaC7xNKBecWTSsmsjqdhAdWiZUzn5lhg3YkR9Y1VWgwcC h2yef+026nKA== X-IronPort-AV: E=Sophos;i="5.77,488,1596524400"; d="scan'208";a="534494609" Received: from jekeller-mobl1.amr.corp.intel.com (HELO [10.212.69.244]) ([10.212.69.244]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2020 13:35:32 -0800 Subject: Re: [PATCH net-next v1] ptp: document struct ptp_clock_request members To: Ahmad Fatoum , Richard Cochran Cc: kernel@pengutronix.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201117213826.18235-1-a.fatoum@pengutronix.de> From: Jacob Keller Organization: Intel Corporation Message-ID: <26e16e25-c5ac-1474-fcc9-466cea4bcf9a@intel.com> Date: Wed, 18 Nov 2020 13:35:29 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <20201117213826.18235-1-a.fatoum@pengutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/17/2020 1:38 PM, Ahmad Fatoum wrote: > It's arguable most people interested in configuring a PPS signal > want it as external output, not as kernel input. PTP_CLK_REQ_PPS > is for input though. Add documentation to nudge readers into > the correct direction. Agreed. I think at least one driver has abused the PPS in the past as a way to request that we enable the PPS hardware, resulting in effectively using it as a limited form of the EXTTS interface. Hopefully this helps reduce the confusion here! Reviewed-by: Jacob Keller > > Signed-off-by: Ahmad Fatoum > --- > Prompted by Richard's comment here: > https://lore.kernel.org/netdev/20180525170247.r4gn323udrucmyv6@localhost/ > --- > include/linux/ptp_clock_kernel.h | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h > index d3e8ba5c7125..0d47fd33b228 100644 > --- a/include/linux/ptp_clock_kernel.h > +++ b/include/linux/ptp_clock_kernel.h > @@ -12,6 +12,19 @@ > #include > #include > > +/** > + * struct ptp_clock_request - request PTP clock event > + * > + * @type: The type of the request. > + * EXTTS: Configure external trigger timestamping > + * PEROUT: Configure periodic output signal (e.g. PPS) > + * PPS: trigger internal PPS event for input > + * into kernel PPS subsystem > + * @extts: describes configuration for external trigger timestamping. > + * This is only valid when event == PTP_CLK_REQ_EXTTS. > + * @perout: describes configuration for periodic output. > + * This is only valid when event == PTP_CLK_REQ_PEROUT. > + */ > > struct ptp_clock_request { > enum { >