Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp485357ybe; Tue, 10 Sep 2019 23:20:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLyuLl7QEyNiMUp23BUF7MTV+90O+EIEkN68urv7YBuTJBEwkjSI6FaI2TMnTUMKSBOi2n X-Received: by 2002:a50:ab0f:: with SMTP id s15mr21460953edc.119.1568182845650; Tue, 10 Sep 2019 23:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568182845; cv=none; d=google.com; s=arc-20160816; b=VSZbW3YtGYvIjweL9+46++UjKGjDhr4xnmdBkvZREhQpmyqaK9oR2uU62kZcY6DIK5 cGvMo86RFVwdV2rSLlnLxIN1ZowdTE5j+xKf2EEiNMKtaCrMFbVy6sXEdBxTAc3jXQs6 zUULVWfYMazemxkXR73c30M7ZL9vwWB+DC1gr0pYS64F/IGPv14tDXDaD4fI//iIxGWg FcS64nd6Q/RBTVSZOQOBugLqrLPq8faRtduL9514+Atb1hKonDZ4YEtmvB9RCuluY9xV 2M7WzF+/gQGlmfaAg4wFasatAJalJFHeqawcliFkzO3nK8SrahWZZ6CykHSrcNvXV6P0 PzSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=oUgP+EqjHuP+rDfKzAPTgDKjY9HUq3fW0kfdcuq/WHY=; b=unpLAD460W03enYQi5oy4sPvUqRI7M4xH+n7jScm24+thHk70CyM65pwl0kIV1o07c Opic3eCDpwgRMqpFyr/gh2V3gm2ALVnCb6FaB+/m/PhG74amBULgvAD7wDRx3EwqJReB rsMlMGU+QDcmoq7cwMJnsVlX8oVa7BLjNMT9kWG2xgtZJt8gbkyJ8q2ZFBrWA5tTZAQp lg6M1hIlYGrll6/iKz9rNeW3Mgfh12Un2hW7sPKAKhzQuxS7lxJADhkl2aT8PAzTHKat UnTwzKd/mhwDtSdHL6ScEcvpno1NcgvoC7gA/9h2PX1SWvDKUU3/48zwwlMiao4aIQwV YK5w== 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 o56si13073836edc.349.2019.09.10.23.20.21; Tue, 10 Sep 2019 23:20:45 -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 S1726893AbfIKGQ1 (ORCPT + 99 others); Wed, 11 Sep 2019 02:16:27 -0400 Received: from mga04.intel.com ([192.55.52.120]:26661 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726018AbfIKGQ1 (ORCPT ); Wed, 11 Sep 2019 02:16:27 -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 fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 23:16:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,492,1559545200"; d="scan'208";a="185731691" Received: from pipin.fi.intel.com ([10.237.72.175]) by fmsmga007.fm.intel.com with ESMTP; 10 Sep 2019 23:16:25 -0700 From: Felipe Balbi To: Richard Cochran Cc: Christopher S Hall , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Felipe Balbi Subject: [PATCH v4 2/2] PTP: add support for one-shot output Date: Wed, 11 Sep 2019 09:16:22 +0300 Message-Id: <20190911061622.774006-2-felipe.balbi@linux.intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190911061622.774006-1-felipe.balbi@linux.intel.com> References: <20190911061622.774006-1-felipe.balbi@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some controllers allow for a one-shot output pulse, in contrast to periodic output. Now that we have extensible versions of our IOCTLs, we can finally make use of the 'flags' field to pass a bit telling driver that if we want one-shot pulse output. Signed-off-by: Felipe Balbi --- Changes since v3: - Remove bogus bitwise negation Changes since v2: - Add _PEROUT_ to bit macro Changes since v1: - remove comment from .flags field include/uapi/linux/ptp_clock.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h index 9a0af3511b68..f16301015949 100644 --- a/include/uapi/linux/ptp_clock.h +++ b/include/uapi/linux/ptp_clock.h @@ -38,8 +38,8 @@ /* * Bits of the ptp_perout_request.flags field: */ -#define PTP_PEROUT_VALID_FLAGS (0) - +#define PTP_PEROUT_ONE_SHOT (1<<0) +#define PTP_PEROUT_VALID_FLAGS (PTP_PEROUT_ONE_SHOT) /* * struct ptp_clock_time - represents a time value * @@ -77,7 +77,7 @@ struct ptp_perout_request { struct ptp_clock_time start; /* Absolute start time. */ struct ptp_clock_time period; /* Desired period, zero means disable. */ unsigned int index; /* Which channel to configure. */ - unsigned int flags; /* Reserved for future use. */ + unsigned int flags; unsigned int rsv[4]; /* Reserved for future use. */ }; -- 2.23.0