From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=148.163.129.48 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796169128; b=Me9MCEUQh41DteVaQsoKorliY+zJNu8vtFut8tfSv5zxEA61ggJrMny2ljS5yF3BMFoV XlJsVIjBxJxgX+xxbXth2Oz+Gvi4fUaxQsNRyw2qbtk2itdWAnKwFSrzsu0/1ZoXIrnwl YfVwTHXHMg7Mjk8EosYlth0NNuSRYlHarQIq3OUGGAZiYEV7uWKZBNFxVnTEsesC+lU6E /F+ZelYQDXKFn4j1JZA8a3arc4jflUAAZNcWstvk9A6aSO0BkoP2IWwYx320A2fwr4TDQ RZGVp4jp7eHT00BzQ1c/2e5h4r5kXtKdvCHvrUK/5dlx9fSMpqP+KLeB7CZpqlJ0tIg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796169128; h=DMARC-Filter:DKIM-Signature:X-Virus-Scanned:Received:DKIM-Signature: Received:Received:From:To:CC:Subject:Thread-Topic:Thread-Index:Date: Message-ID:References:In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator:x-ms-publictraffictype: x-ms-traffictypediagnostic:x-ms-office365-filtering-correlation-id: x-ms-exchange-senderadcheck:x-ms-exchange-antispam-relay: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report: x-ms-exchange-antispam-messagedata-chunkcount: x-ms-exchange-antispam-messagedata-0:Content-Type: Content-Transfer-Encoding:MIME-Version: X-Exchange-RoutingPolicyChecked:X-OriginatorOrg: X-MS-Exchange-CrossTenant-AuthAs:X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-MDID:X-PPE-STACK: X-MDID-O:X-PPE-TRUSTED; bh=+6qsA1k3m1nFOBeCjHiOJBAwzecouXVeWTrUTxGu5nA=; b=GGdD+vLlfQABpSUF5jpfp+87cRxPWtd5XEnxacTKgd/B7DZHmZJvEaEzNtQOHhmUx92v LVI+0KqLyVRkPCYD7O2UIzlNFGIbH2k3undo3d1qSdO8M+7+TB3tkrn3Mmf5oWEa7Qbir cr/6WzSDUDGjOz/vptNkJWud7/xwJhCn1jOzyR16MkkkY04VJjnECk8zNTvXhsCH9xces UptA1CCBsE4Mv7GOWXcUHl2G7LUik06TjEMPMWN3Bp36Whc1poGVuXkOwPnQeRiWkhnLN pl9ahd2sPcLzkIoQWdHebLv5TbEspR5bf4ASWm1G1tHHMXXUGJLLEP7eVph4wvy/Zug== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=sitime.com; spf=pass smtp.mailfrom=sitime.com; dkim=pass header.d=sitime.com header.i=@sitime.com header.a=rsa-sha256 header.s=mail header.b=QaRJ5tVz; dkim=pass header.d=Sitime.onmicrosoft.com header.i=@Sitime.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-Sitime-onmicrosoft-com header.b=eZdC9BnE; arc=pass header.oldest-pass=0 smtp.remote-ip=148.163.129.48 Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9320060A261D; Tue, 1 Dec 2026 23:52:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9320060A261D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sitime.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sitime.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sitime.com header.i=@sitime.com header.a=rsa-sha256 header.s=mail header.b=QaRJ5tVz; dkim=pass (2048-bit key) header.d=Sitime.onmicrosoft.com header.i=@Sitime.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-Sitime-onmicrosoft-com header.b=eZdC9BnE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sitime.com; h=cc:cc:content-transfer-encoding:content-transfer-encoding:content-type:content-type:date:date:from:from:in-reply-to:in-reply-to:message-id:message-id:mime-version:mime-version:references:references:subject:subject:to:to; s=mail; bh=+6qsA1k3m1nFOBeCjHiOJBAwzecouXVeWTrUTxGu5nA=; b=QaRJ5tVzmZ73yhJA3BGVzZuuT5L/6+SwLN189yST3wazxFsp5ae2ytPqG4x9cXz5HNvtmQz+emhkD5vSsgA3UuK+/omirwEDOQBMoYv/438D6a3pK7oYVdnkTdhHbuqAY9FygYvFKUkl4IqDyD7s79UzcTTyLmRk4K2mmrbgauB2k5S0qn0nhmv5jP9O51CMXmMaLG94TMPxmR3ms80hJscr/Ib0LX76WMREt58Ddd94HQo2PcOquuJCdPWDsYXviGP4kBPwG4U2n/Jt/nV8wKxzufPL486tO0cNKL1kXLQYhIkZAtDudFTyyLfyFS/pMs60Vc85LCiqw4fFBt9YCg== X-Virus-Scanned: Proofpoint Essentials engine Received: from BN1PR04CU002.outbound.protection.outlook.com (mail-eastus2azon11020102.outbound.protection.outlook.com [52.101.56.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 6795C1C006B; Tue, 1 Dec 2026 23:52:05 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uOWdBwqDHB4eW30BvUutA8yBr6a7N1fOczWb6LKrIFa+vJNA4fBqb0HeUlGvVtNNFy09CNLtuWcmUern8Jz4zquEPahU/SDOcBbqkyRPycvoru8bDSb90M9X66i/TTy4pRIWWiI9jgUkjk4tIEBS31qZ6k+n6yumSlNannRJHagVlyjwJ1JtgKNQk1nzEjUSprmXPPrsPrL26ah9aohYZIifYIgpPQf30ZqcDY4lG7eQg480uS4/D4J3JQ6Gmkc4q2Txlnk1Z+lKR7g7wN3m3vNxcN1lHEAl9JU6ANBWjFf+mf0fEFB9jaUqxy9hEIfaBTqLhJM81BLNba8AG8Rp3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=+6qsA1k3m1nFOBeCjHiOJBAwzecouXVeWTrUTxGu5nA=; b=HtuEClmTVXCVCEPToZnMoCS7v5nHkY8lCrAoNLVTFOOrLDL65LyBPQdvXYZsy9qj+Oq4fO9c3CjzQP+psgnDSqQnrvKxrdE5YW6fpuqw48q2pVYKnfJ2qm5nx6pEF/ImTXRZErC+/LJCHE1iqn5GVRpBQVrWK5qhcFBVmrcFzDXQvYSonxvlVmfbzWYUQgICZmdVT1ImmDpnq1AkeSJIndhK6atPl1mL08A2oMDIJfZ8n1IlTGFdg0xlwK7s5YdIJYIfvEsP5oZSqZa0CydNbItDOXSRM4JRqG7O1h/elakDclUfEGqrEI3zAoZTyy12nATfYCtJ1MS68qO1SXAStg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sitime.com; dmarc=pass action=none header.from=sitime.com; dkim=pass header.d=sitime.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Sitime.onmicrosoft.com; s=selector1-Sitime-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+6qsA1k3m1nFOBeCjHiOJBAwzecouXVeWTrUTxGu5nA=; b=eZdC9BnEpD6BHFPyO9ZrwRi2Fatjieg/c9yF2naQGrtE5yZvK4USgR3L4mWiBqbS9idHDeykeCagEUZiM+TzVC5pV5B3dfjMmSwJImdUsaZlJ61jB1414JdbcZ8qIt6rb3ImbJQz12NkNC5TjtYfgUaHbE2i7l0yCBK6vAoocpkBeolrnTDYvT0Pl3ptzwhVwGIuuQu7T4JEvxWdvw0xKKq6DFn4nqYPEl5bu2x5SIuu/JKgfuvrYI5cCMBaR0+PsNEe4JxvNAfQAqjXAyBHRPKysAN/FIsSVYe4T4O98X3uYUFQOSIl+VSqmhfLAXYy65YEAIAAxtv7O9tphwYxKg== Received: from LVWPR20MB994915.namprd20.prod.outlook.com (2603:10b6:408:3bf::16) by SJ2PR20MB6330.namprd20.prod.outlook.com (2603:10b6:a03:502::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Tue, 1 Dec 2026 23:52:03 +0000 Received: from LVWPR20MB994915.namprd20.prod.outlook.com ([fe80::9551:3864:128b:8c01]) by LVWPR20MB994915.namprd20.prod.outlook.com ([fe80::9551:3864:128b:8c01%4]) with mapi id 15.21.0688.009; Tue, 1 Dec 2026 23:52:03 +0000 From: Ali Rouhi To: "jiri@resnulli.us" CC: "ivecera@redhat.com" , "vadim.fedorenko@linux.dev" , "arkadiusz.kubalewski@intel.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" , "prabhakar.mahadev-lad.rj@bp.renesas.com" , "cjubran@nvidia.com" , "Oleg.Zadorozhnyi@devoxsoftware.com" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH net-next v17 01/13] dpll: omit pin phase attributes the driver has no value for Thread-Topic: [PATCH net-next v17 01/13] dpll: omit pin phase attributes the driver has no value for Thread-Index: AQHdge72HznZQOBuhEKyDxe6hBX0Pw== Date: Tue, 1 Dec 2026 23:52:03 +0000 Message-ID: <20261201235202.97645-2-arouhi@sitime.com> References: <20261201235202.97645-1-arouhi@sitime.com> In-Reply-To: <20261201235202.97645-1-arouhi@sitime.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=sitime.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LVWPR20MB994915:EE_|SJ2PR20MB6330:EE_ x-ms-office365-filtering-correlation-id: 4c7398fd-4164-4288-a6d1-08df5006193f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|376014|1800799024|23010399003|366016|38070700021|10067099003|56012099006|261022075727099003|261026121527099003|261021123027099003|261021121427099003|261026140227099003|261022105027099003|261028144727099003|261102123227099003|261009223027099003|22082099003|18002099003|6133799003; x-microsoft-antispam-message-info: EJMPguYL/TeZlnKKQzZ+UeIPMtH89e2/trspie0fa9NDomvwWhi3FNXcTbGccX1T9ndE2J0gb67lXQtTn5J9C/xQoMZcFvbeU9ny06cT9zwEN2vovW/z313Sykuf7Aroylg2eVu3P4WeLuf3gj26jfYdFs3yj2108WM+o+sp1f+oM6Z1lilAz8Tjmy6OMj7AFdTW6Yo7S2OwvKCQpSU+18RIGfb7bYtXvHkYe/5tpT2Ub543mK7n/+Ya7xuCXNv8yHyC87hGsTQMSoP0LaeC9dxki1niengUAIYpdZf9t+wZ8HIEWKjDiFPyUS+g1lgkFPtSZhOKj4IZDP7oW2zmyYfE+tW0VvQBQBMksqjTDTeHtgIgpskBmNEF0/Q+pkvDXGgfEY/bd6dmpiSQtRpVUuqO/KDAsML24CHRnCXUTBZq0vse+GFJqgt5rLObVKX0PCPzSbEffGX1/0H73AxpkFb1BM1ePJU60R7v2NApbMvPJitcEIexKs34nmYSAvGi5AuI7rqzy3V1Lcq7pgg8ErICQLv79hAgdtScMwPeSWWrEQU69twfzG2xYtQ75vMo7FvKGgftokoTVIqQaR/YkeWByP0dq54QnZT/1+0+T/f/BgaHCoVpdhGzjsz0P3/Bfj/ypw6TELbWl1tPjdb9chQqfyBQ3ORL30LhO0ivWRtju3Fi8fsV6hQXQHeWX2H6m+o9J7inQBvGXCconclllMQvnJQ8squIm/m2llapirM= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LVWPR20MB994915.namprd20.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(23010399003)(366016)(38070700021)(10067099003)(56012099006)(261022075727099003)(261026121527099003)(261021123027099003)(261021121427099003)(261026140227099003)(261022105027099003)(261028144727099003)(261102123227099003)(261009223027099003)(22082099003)(18002099003)(6133799003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?XuY79EseBTITo32abSY2UIcTQKicXvJVZMqJgM69OUL1G632IEv80wAr7l?= =?iso-8859-1?Q?ob52pMjIgOBOwy1GbiGx9vHaMriFTVSfsCH62pmxbQGCZY7JZBNKkSTXdU?= =?iso-8859-1?Q?MPVuVoNXge+i8ezY7JGineDkK5dntqlrUbt92VdUnEQAc/3bY8GfMIcDd5?= =?iso-8859-1?Q?3i8VovG0beZ2WlB2vBQSyFs7aXwixfvsPvr+EYAvJP/sFoGV1oZ4UHczMy?= =?iso-8859-1?Q?v/+87/9S7Ck9zfUMxwx5+vTZqXE1tDMJefIMbs7N2DMpzXKDzzjHE0S8TN?= =?iso-8859-1?Q?JipfDWPJYVgAoEu3m06RXltNZL38e3B1GsnJE/83+C53neuaDaumDosiEV?= =?iso-8859-1?Q?G17rj8whl6ukf3+dyenbqBJ5IyLifBxfnHOwk1CQsmHllFtJZOD+sP0q/4?= =?iso-8859-1?Q?f+KqKwBFk7EAYv+QryYF5am4ThRawetEdsJ2OVJ8HThhR2EnrB9S1L5KtE?= =?iso-8859-1?Q?Llz47F2o6FuV6Qy8ho55WuKQwCFqGIOdWwwUUIkF+BbYkudZbcy+mazKkn?= =?iso-8859-1?Q?rJvGy0H8+iv2ecPEdykz1qaD5F9TZa5V0nohRhVixv5PI7kRd4GkU17PJ4?= =?iso-8859-1?Q?mE1wiFUlGdYAViJIpZQLWVsBqWn7iY7ypCDxdULYevjStnWXRKrL8UsrhD?= =?iso-8859-1?Q?w8wPeoDGFLvSq0+Adlmt+VpQGmOuVPpKdRigD3M8mkU310rrKJKl+o34vS?= =?iso-8859-1?Q?f+hqlB2FZYeUUZg+kbw9IRfsx55MfjgvggGsV97wcpiFcM9qLLkDGoo+4s?= =?iso-8859-1?Q?WHm84mLI8+JYu/Tw3J6vhVjMzjdwslY68dKVkOC4zoirsrsqfTXmeYdFqG?= =?iso-8859-1?Q?p3sgTtAGE+8//jV0WGFu8qtHiJbxwMSuLJqcGk4DixyYqmv1PD2ti1ZNy3?= =?iso-8859-1?Q?ru9DeNf/6HnNSAOvCX3egolQANx8ZZ9oUPpiG6vYaFnaGqm1wzFoRYY7E2?= =?iso-8859-1?Q?JnQFlsZHzHiHvQoEstidxSXhu76UotJu0fNiK1dxRU3y1RFSTyAQ8t2bq0?= =?iso-8859-1?Q?mlCmrNV0F9+OWVd4QTKSsefslJ+9IqzlZNzKTB8k+G2JX7kLuJfRtr7//v?= =?iso-8859-1?Q?32TlIuRcVTaJU/h1gD/AGB4GHqpgP0fM5bCgcXDU5qBkgS4aWcR5XGIEmR?= =?iso-8859-1?Q?KxqxQLK7W78FVwx2tLXamXQlMVPWkwG/re8sIxW/2cEXlb2y8HxVHh+uBm?= =?iso-8859-1?Q?pFTafvylsjjkIktPWO2Ud4ANMo/5eBcuyUSe1p/LeOY3eRl2wGNUVw0fiW?= =?iso-8859-1?Q?jBM3SofD3GgH1UfyTkyDyTU8UYZ1rvPn9LfV0LediK5ZJ+Z3crn3tRNxN6?= =?iso-8859-1?Q?zRJqnlCO4p/RS3cg2LpZrBoi39Gq0AhhKOijJwWP5FFiInfs7KHjKkKxW5?= =?iso-8859-1?Q?YHfo3YnESOre1GhSyEUBm2dCH2LI0U17Do0ueuGHOBzXY2qwGW3G6yDkCs?= =?iso-8859-1?Q?yIQPu7WcV+EEGQISsW/Ftu6L/ZAvxEWl+Q6d4iJ1bAcHmjMs0CtJSZ9aeI?= =?iso-8859-1?Q?adJWtgrrhHjwNdCYbDeLS12fiAuhqOnxYUYCR/P3qj6/0Zz0860uuYDvvU?= =?iso-8859-1?Q?gD/TDGShdCLNpLbgo385dzoLBqfHbil6m+LR7ExvqmHHfXJ6yw7BdXI1rT?= =?iso-8859-1?Q?i/uwrzh2slmf0TLQ6Q6Z1YfwlPjrPNd53YqYoyvPmbfoPiqIrFYPb6Tu5Z?= =?iso-8859-1?Q?c0LNMBHePHOIQUeL815FVfVuQkjWdf6R0RdXDDet30hAIukfAsJKQhenE8?= =?iso-8859-1?Q?010QZptW3GsoM245jU+cd+vw6/Yt6TVHk/hhMrCRT+0jdW?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Exchange-RoutingPolicyChecked: Os67eWLFTQA1ATwlh9S49HUeHhLoQFRW46PYF66QuqmYvNZCWJfvpAy0snL8K73srFv7Gar73wS21cj9olxaMYx31zQU5x4D4hLiBvgLsGbAijbO1c0BD2j/eAooxvILyYpFFgdgTVlI+l2q/GLuAGQyXX6QFPc+HOyHlrJQEZxASSr+qtEcnjPPesCkwElVE1P7kiP2fHFV1SRj45g9frbHsPovM2XHyP4gofV+AFt4RxvYS9gd77ESLYjFyJu0IUB4rJfEQIN71O/nSnC+qaHB3pnumv1h9m5WOg6vPmSrw8wmcvTfeHfYA6emahWxRrr9+2gY6nmdvaCtAMVvIA== X-OriginatorOrg: sitime.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LVWPR20MB994915.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c7398fd-4164-4288-a6d1-08df5006193f X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2026 23:52:03.2599 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8fb55916-cf10-4b0d-96f4-cf3952657263 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qSGI2nYAn9JaZRb6TWwE4ARVFFuTf1+Kb3TpcCukUFr1z3tqFAOlB1VVQOGbxH1uMF4YKs5iiLk2uPXs9pRDGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR20MB6330 X-MDID: 1796169126-j3tui8Rpa_CK X-PPE-STACK: {"stack":"us1"} X-MDID-O: us1;ut7;1796169126;j3tui8Rpa_CK;;ba04557de9d2da8490f5f1e6de07b967 X-PPE-TRUSTED: V=1;DIR=OUT; From: Oleg Zadorozhnyi =0A= =0A= Let phase_offset_get and phase_adjust_get return -ENODATA for a pin the=0A= driver has no value for, and leave DPLL_A_PIN_PHASE_OFFSET and=0A= DPLL_A_PIN_PHASE_ADJUST out of the message in that case, as=0A= dpll_msg_add_ffo() already does for the fractional frequency offset.=0A= Today any error from either callback fails the whole pin dump.=0A= =0A= A driver that measures the phase offset only on the input its PLL=0A= tracks, or whose part holds a delay larger than the s32 the adjust=0A= attribute carries, has no value to report for the pin, and a zero=0A= cannot be told from a measurement. A phase adjust request on such a=0A= pin is passed to the driver without the comparison against the old=0A= value, so the delay can still be set or cleared.=0A= =0A= Document the -ENODATA return in dpll.rst, at the two callbacks in=0A= struct dpll_pin_ops and in the netlink spec.=0A= =0A= Signed-off-by: Oleg Zadorozhnyi =0A= Signed-off-by: Ali Rouhi =0A= Reviewed-by: Ivan Vecera =0A= ---=0A= Documentation/driver-api/dpll.rst | 11 +++++++++--=0A= Documentation/netlink/specs/dpll.yaml | 6 ++++++=0A= drivers/dpll/dpll_netlink.c | 14 ++++++++++----=0A= include/linux/dpll.h | 2 ++=0A= 4 files changed, 27 insertions(+), 6 deletions(-)=0A= =0A= diff --git a/Documentation/driver-api/dpll.rst b/Documentation/driver-api/d= pll.rst=0A= index 7c117ae37cc1..fce34a9e90b9 100644=0A= --- a/Documentation/driver-api/dpll.rst=0A= +++ b/Documentation/driver-api/dpll.rst=0A= @@ -195,7 +195,9 @@ Phase offset measurement and adjustment=0A= Device may provide ability to measure a phase difference between signals= =0A= on a pin and its parent dpll device. If pin-dpll phase offset measurement= =0A= is supported, it shall be provided with ``DPLL_A_PIN_PHASE_OFFSET``=0A= -attribute for each parent dpll device. The reported phase offset may be=0A= +attribute for each parent dpll device. A driver that has no measurement=0A= +for a pin returns ``-ENODATA`` from ``phase_offset_get`` and the attribute= =0A= +is left out of that parent device nest. The reported phase offset may be= =0A= computed as the average of prior values and the current measurement, using= =0A= the following formula:=0A= =0A= @@ -221,6 +223,10 @@ granularity that pin handle shall be provided to the u= ser on=0A= attributes. Configured phase adjust value is provided with=0A= ``DPLL_A_PIN_PHASE_ADJUST`` attribute of a pin, and value change can be=0A= requested with the same attribute with ``DPLL_CMD_PIN_SET`` command.=0A= +A driver that has no value for a pin returns ``-ENODATA`` from=0A= +``phase_adjust_get``; the attribute is then left out, while the minimum,= =0A= +maximum and granularity are still provided, and a requested value is=0A= +passed to the driver without a comparison against the old one.=0A= =0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=0A= ``DPLL_A_PIN_ID`` configured pin id=0A= @@ -260,7 +266,8 @@ In such cases, users can also control the feature using= the=0A= ``DPLL_CMD_DEVICE_SET`` command by setting the ``enum dpll_feature_state``= =0A= values for the attribute.=0A= Once enabled the phase offset measurements for the input shall be returned= =0A= -in the ``DPLL_A_PIN_PHASE_OFFSET`` attribute.=0A= +in the ``DPLL_A_PIN_PHASE_OFFSET`` attribute, except for an input the driv= er=0A= +has no measurement for (see above).=0A= =0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=0A= ``DPLL_A_PHASE_OFFSET_MONITOR`` attr state of a feature=0A= diff --git a/Documentation/netlink/specs/dpll.yaml b/Documentation/netlink/= specs/dpll.yaml=0A= index 8fa789a50273..7d3dced30dd3 100644=0A= --- a/Documentation/netlink/specs/dpll.yaml=0A= +++ b/Documentation/netlink/specs/dpll.yaml=0A= @@ -456,9 +456,15 @@ attribute-sets:=0A= -=0A= name: phase-adjust=0A= type: s32=0A= + doc: |=0A= + Configured phase adjustment of the pin, in picoseconds.=0A= + Left out when the driver has no value for the pin.=0A= -=0A= name: phase-offset=0A= type: s64=0A= + doc: |=0A= + Measured phase difference between the pin and the parent dpll=0A= + device. Left out when the driver has no measurement for the pin.= =0A= -=0A= name: fractional-frequency-offset=0A= type: sint=0A= diff --git a/drivers/dpll/dpll_netlink.c b/drivers/dpll/dpll_netlink.c=0A= index e5380d95f238..acf71a93f230 100644=0A= --- a/drivers/dpll/dpll_netlink.c=0A= +++ b/drivers/dpll/dpll_netlink.c=0A= @@ -388,8 +388,11 @@ dpll_msg_add_pin_phase_adjust(struct sk_buff *msg, str= uct dpll_pin *pin,=0A= ret =3D ops->phase_adjust_get(pin, dpll_pin_on_dpll_priv(dpll, pin),=0A= dpll, dpll_priv(dpll),=0A= &phase_adjust, extack);=0A= - if (ret)=0A= + if (ret) {=0A= + if (ret =3D=3D -ENODATA)=0A= + return 0;=0A= return ret;=0A= + }=0A= if (nla_put_s32(msg, DPLL_A_PIN_PHASE_ADJUST, phase_adjust))=0A= return -EMSGSIZE;=0A= =0A= @@ -411,8 +414,11 @@ dpll_msg_add_phase_offset(struct sk_buff *msg, struct = dpll_pin *pin,=0A= ret =3D ops->phase_offset_get(pin, dpll_pin_on_dpll_priv(dpll, pin),=0A= dpll, dpll_priv(dpll), &phase_offset,=0A= extack);=0A= - if (ret)=0A= + if (ret) {=0A= + if (ret =3D=3D -ENODATA)=0A= + return 0;=0A= return ret;=0A= + }=0A= if (nla_put_64bit(msg, DPLL_A_PIN_PHASE_OFFSET, sizeof(phase_offset),=0A= &phase_offset, DPLL_A_PIN_PAD))=0A= return -EMSGSIZE;=0A= @@ -1452,11 +1458,11 @@ dpll_pin_phase_adj_set(struct dpll_pin *pin, struct= nlattr *phase_adj_attr,=0A= ret =3D ops->phase_adjust_get(pin, dpll_pin_on_dpll_priv(dpll, pin),=0A= dpll, dpll_priv(dpll), &old_phase_adj,=0A= extack);=0A= - if (ret) {=0A= + if (ret && ret !=3D -ENODATA) {=0A= NL_SET_ERR_MSG(extack, "unable to get old phase adjust value");=0A= return ret;=0A= }=0A= - if (phase_adj =3D=3D old_phase_adj)=0A= + if (!ret && phase_adj =3D=3D old_phase_adj)=0A= return 0;=0A= =0A= ret =3D ops->phase_adjust_set(pin, dpll_pin_on_dpll_priv(dpll, pin),=0A= diff --git a/include/linux/dpll.h b/include/linux/dpll.h=0A= index 7a6f8796cda2..46980b419e1c 100644=0A= --- a/include/linux/dpll.h=0A= +++ b/include/linux/dpll.h=0A= @@ -121,10 +121,12 @@ struct dpll_pin_ops {=0A= int (*prio_set)(const struct dpll_pin *pin, void *pin_priv,=0A= const struct dpll_device *dpll, void *dpll_priv,=0A= const u32 prio, struct netlink_ext_ack *extack);=0A= + /* -ENODATA: no value, DPLL_A_PIN_PHASE_OFFSET is left out */=0A= int (*phase_offset_get)(const struct dpll_pin *pin, void *pin_priv,=0A= const struct dpll_device *dpll, void *dpll_priv,=0A= s64 *phase_offset,=0A= struct netlink_ext_ack *extack);=0A= + /* -ENODATA: no value, DPLL_A_PIN_PHASE_ADJUST is left out */=0A= int (*phase_adjust_get)(const struct dpll_pin *pin, void *pin_priv,=0A= const struct dpll_device *dpll, void *dpll_priv,=0A= s32 *phase_adjust,=0A= -- =0A= 2.39.2 (Apple Git-143)=0A= =0A=