From patchwork Mon Dec 20 12:08:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Radu Pirea (NXP OSS)" X-Patchwork-Id: 12687721 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 633A0C433EF for ; Mon, 20 Dec 2021 12:09:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232229AbhLTMJN (ORCPT ); Mon, 20 Dec 2021 07:09:13 -0500 Received: from mail-am6eur05on2074.outbound.protection.outlook.com ([40.107.22.74]:43712 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229533AbhLTMJN (ORCPT ); Mon, 20 Dec 2021 07:09:13 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yvr3DCVXjsCJLk8O5etiN3ejzsX3HJFrnl/3xe5TnLMjBLhuvw+W8mrPF+CiRJMTRyPmEIsS9oOjVgGQyoCc9a/YX/NDcvtw7exQOpJAcjAg/dhGvmDYuAqlo4oqWnZ+92hqk9c741ed0Sn4gaLgzIBmIxKtw4lRuGVYzK6l4YgjGDAvwTufzMZyHeMrJ45INSknIFNVB3hyIKuQfLoEm32ZNEZVDAHNek45A4QC6KYMRxuRbyhiDpbu/3XJF1HgdUbBfWB3oPG+7EYOCq5LcjOSFOEbZ9Q+Uhewxm+P3hkiofoh61GKwrfsuwuqCxYwEe3+dWh+ecKAlYBCzkFHNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4D6wC0+f7akCKlFQaQh2iwY7yJyOWUJfjBq2lDhFJHo=; b=UTDKKc2J3bKk/8tcqQ0Wxm/eult7gpT0yMOmSjkZYpVf/lUqDEv9AaRNQVtSEOxYsrLXfan0trtdk9MkioJlQC6eB8piNz+5OerssyKQyc+ghpUqOwiHCaH3h6nUtYHu19uP9iD37zkGc0lA/aC7opM2GEpKX95WGd2lL0f13rBhhrPNs10xKtebrOCix0sYAVvACa0rKNzrErksLROtNX09wLUYC2sihIIdvzGr3IEDT5m9hXjEbc+qnxWfOOF/m6c8+4pZHHIHeHDZ/fsoGdHr2JAb6pMt8iorLgFAHqXRqnU6c35jYAPyGiqOsZyeTf1VROFYJQVZ9hWfVN54Ig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4D6wC0+f7akCKlFQaQh2iwY7yJyOWUJfjBq2lDhFJHo=; b=AIQ4F/84lfvDf+p126UKwKvkTR2lA9MmLcuhuegpwPCSkioLE7lg+McMAB/4DVE3j96f3jtJ6STlsVtRjCes+m2k3LUuUOwA1VG+2W8RXyZYGgqO3qAm6zz/uDX4TWRdqZVmWPjvXJmS3tAlYAojxK0WpXQ30Fo2/5Yt9SSWxNo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8954.eurprd04.prod.outlook.com (2603:10a6:20b:409::7) by AM9PR04MB8825.eurprd04.prod.outlook.com (2603:10a6:20b:408::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.17; Mon, 20 Dec 2021 12:09:08 +0000 Received: from AM9PR04MB8954.eurprd04.prod.outlook.com ([fe80::1109:76b5:b071:7fce]) by AM9PR04MB8954.eurprd04.prod.outlook.com ([fe80::1109:76b5:b071:7fce%7]) with mapi id 15.20.4801.020; Mon, 20 Dec 2021 12:09:08 +0000 From: "Radu Pirea (NXP OSS)" To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: christian.herber@nxp.com, andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org, "Radu Pirea (NXP OSS)" Subject: [PATCH 1/3] ptp: add PTP_PEROUT_REVERSE_POLARITY flag Date: Mon, 20 Dec 2021 14:08:57 +0200 Message-Id: <20211220120859.140453-1-radu-nicolae.pirea@oss.nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: AM4PR0101CA0069.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::37) To AM9PR04MB8954.eurprd04.prod.outlook.com (2603:10a6:20b:409::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dd60fa5b-2e54-450c-8818-08d9c3b1868a X-MS-TrafficTypeDiagnostic: AM9PR04MB8825:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E9VwZpH0r25Xysvuc/eKS6arltWC+8QNYownFT4WOu76rsnbZZwDLOwTb17TwopyscRyzddXqzTLcIrpHTfXm05lXb5RhQAujjvFCPU/4Fjhr4SgieRMsGzm63F4njYV3VjxO5v3K1TrqYZ8knEf4Ou3qmzDRjdE3gWzq7YAz30FV0R5VlftUUdibR5z28CtGy/7vPCwU7ROsC71RwS3KOrpHBmA0zFFyAFoisHbRURp/J7uWN1Cn9TjH0tz8J2iKF6Eu85Qm0TvBh/oVTbCQStScph0HJDqXcVuTHEqcp5AkSQ8dOMN+yrCno0J1ojPvvOGPEv0Q5PsGsQGVsf867JyWTtpxXJtWinGlo/Zo2SYR7cUIQ+L0UJ46zq64wgSKN6R1tK/ZWMw2PLa9PL8P1dziarkezgwv0BpbMYSsWTt5yl9fsOGscYgTUWahGMf+f1VH9s3AXnYF9dWl/QFRtvuGVyH9rcsY8xniDjNRx2p+j3NZzI0G+5+VPgU0pUleXkgX7mIeBjf5y0oZL42kWOG7/9qxPh6ruVEPakBBOdD75IJA4eIaeTeDGtUdiEYfUoSkU63naPV6D1hEjgQPREjk7EYQDGSBUADNlMvYJwGSi3r7D/P7D95Q8Hb1QiSFV+xASGIM5HpOlesgraUw9O+ZOHOyaHCfnAV4vxcWr0ANh54pVyX7E4rE+YrT9FFUVf03F4a95skYxuuI/n/Qw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8954.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(1076003)(6506007)(6666004)(26005)(5660300002)(52116002)(186003)(2616005)(8676002)(6512007)(2906002)(8936002)(86362001)(316002)(38100700002)(38350700002)(4326008)(6486002)(66946007)(508600001)(83380400001)(66476007)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gvakov7KcmyrcG62shBj9KB6MzUbkStRwSN1SaWmgmrdlzeI6CztyVCWrPTDraGayGRqGcPfsFp0x5hWLve9FNehz+ytvSo9tUUcUbSuBRVIP1vkl8DDEuEB5fa4cZyOIbtcJj9vxD0LDose7Ekbfp1ff2uz/FepJ2OVKBBvCa6W7s5iiXuxRzHxsiA5GMfv/0V8qha3cKNiQJO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26vkG1z+dmoxTE1B8c4SRlLz0rVuOInOtxQiB+cfs7hPCuD+iNDyo0s/t6Vw/foS3r0YcAltL+qj7PAms2QW1/LK3J7IMQ1ovi6z0AF584NBTT08V2UxOZ6iqdQOl7jUmTEbQxwF9reR3MP604nH6AkfSEZKhZxy57syYSL7QvtgALnvY+FIquQteN1zkB2MvIrYMXCnbnPSmb3nWZFJ+QLHtk1kt6HvEWYm3SytXu5JWidz25QaziJkIt1df31fAMiYvBUuQzgrs8fWrYxIs2UuAmyN4wuEnwXLewt4WCOiwYAzwK8gPLV2EHvDWcpWWjhBdhSkpnRXZ2u3TH7nwLdqoBcQSkXIUyjJuDNQqixf+8ymJAEhaVmSGY9oeaOEWZ0aJKMZIMK57QyRvT5TvdlJyg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd60fa5b-2e54-450c-8818-08d9c3b1868a X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8954.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2021 12:09:08.5490 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sghjBlO7uT6rg7EhrWiE/xdTtQ2CwOL2rp+YAnSJYCa2MJFW4BcoRkklahUs3GwgRsnFlDpc88wFZNvSYU3tqX8bLaZrmXJeVaAiOB6v/DI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8825 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Some ptp controllers may be able to reverse the polarity of the periodic output signal. Using the PTP_PEROUT_REVERSE_POLARITY flag we can tell the drivers to reverse the polarity of the signal. Signed-off-by: Radu Pirea (NXP OSS) --- include/uapi/linux/ptp_clock.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h index 1d108d597f66..34bc4ff89341 100644 --- a/include/uapi/linux/ptp_clock.h +++ b/include/uapi/linux/ptp_clock.h @@ -56,13 +56,15 @@ #define PTP_PEROUT_ONE_SHOT (1<<0) #define PTP_PEROUT_DUTY_CYCLE (1<<1) #define PTP_PEROUT_PHASE (1<<2) +#define PTP_PEROUT_REVERSE_POLARITY (1<<3) /* * flag fields valid for the new PTP_PEROUT_REQUEST2 ioctl. */ #define PTP_PEROUT_VALID_FLAGS (PTP_PEROUT_ONE_SHOT | \ PTP_PEROUT_DUTY_CYCLE | \ - PTP_PEROUT_PHASE) + PTP_PEROUT_PHASE | \ + PTP_PEROUT_REVERSE_POLARITY) /* * No flags are valid for the original PTP_PEROUT_REQUEST ioctl