From mboxrd@z Thu Jan 1 00:00:00 1970 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 96EA8C74A5B for ; Tue, 21 Mar 2023 14:40:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbjCUOkn (ORCPT ); Tue, 21 Mar 2023 10:40:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229843AbjCUOkm (ORCPT ); Tue, 21 Mar 2023 10:40:42 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C86BB4FF3E; Tue, 21 Mar 2023 07:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679409640; x=1710945640; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=avpreVCD80HFe/L5FAIWCSKjQRcBaDRFvTfb+adZrLE=; b=WAlsjCR2TnZUD1Gq5B7Yu5s0Rinh26okDz1PHWkHH0AkxR19HrGn53QD z4qBpQqfH7JA4kttuu42briZUzX7knt6QQiQS7CThr3xMjrNdw88FKoEV DdRV80GO1o7CkQMIVodv/aAdfMmd93r/KqBd67aylQW4dud6CjYDwQrkf KWTnuC878zk/N51zxS7CTu5+72jJ/RhMWUODcWpgMgvsMxDYoTHwiHE5D VB6F+7ZXAG8/mZ9RbxBJlmeMpk28XKaPFeEg1XRHQxXai1ttd+R8SvwIt 1Oa5mQr1etJ7FOb+U7D3p4u/PxZpQ13vpekmROWgTLj54ROScxxT9fgCM w==; X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="403834435" X-IronPort-AV: E=Sophos;i="5.98,279,1673942400"; d="scan'208";a="403834435" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2023 07:40:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10656"; a="770660439" X-IronPort-AV: E=Sophos;i="5.98,279,1673942400"; d="scan'208";a="770660439" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP; 21 Mar 2023 07:40:03 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1ped9d-006l52-2m; Tue, 21 Mar 2023 16:40:01 +0200 Date: Tue, 21 Mar 2023 16:40:01 +0200 From: Andy Shevchenko To: "Zhang, Tianfei" Cc: Nicolas Pitre , Richard Cochran , "netdev@vger.kernel.org" , "linux-fpga@vger.kernel.org" , "ilpo.jarvinen@linux.intel.com" , "Weight, Russell H" , "matthew.gerlach@linux.intel.com" , "pierre-louis.bossart@linux.intel.com" , "Gomes, Vinicius" , "Khadatare, RaghavendraX Anand" Subject: Re: [PATCH v1] ptp: add ToD device driver for Intel FPGA cards Message-ID: References: <73rqs90r-nn9o-s981-9557-q70no2435176@syhkavp.arg> <4752oq01-879s-0p0p-s8qq-sn48q27sp1r7@syhkavp.arg> <40o4o5s6-5oo6-nn03-r257-24po258nq0nq@syhkavp.arg> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Mar 21, 2023 at 02:28:15PM +0000, Zhang, Tianfei wrote: > > From: Andy Shevchenko > > Sent: Tuesday, March 21, 2023 9:03 PM > > To: Nicolas Pitre > > On Mon, Mar 20, 2023 at 04:53:07PM -0400, Nicolas Pitre wrote: > > > On Mon, 20 Mar 2023, Richard Cochran wrote: > > > > On Mon, Mar 20, 2023 at 09:43:30AM -0400, Nicolas Pitre wrote: > > > > > > > > > Alternatively the above commit can be reverted if no one else > > > > > cares. I personally gave up on the idea of a slimmed down Linux > > > > > kernel a while ago. > > > > > > > > Does this mean I can restore the posix clocks back into the core > > > > unconditionally? > > > > > > This only means _I_ no longer care. I'm not speaking for others (e.g. > > > OpenWRT or the like) who might still rely on splitting it out. > > > Maybe Andy wants to "fix" it? > > > > I would be a good choice, if I have an access to the hardware at hand to test. > > That said, I think Richard himself can try to finish that feature (optional PTP) and on > > my side I can help with reviewing the code (just Cc me when needed). > > Handle NULL as a valid parameter (object) to their respective APIs looks a > good idea, but this will be a big change and need fully test for all devices, Since it's core change, so a few devices that cover 100% APIs that should handle optional PTP. I don't think it requires enormous work. > we can add it on the TODO list. It would be a good idea. > So for this patch, are you agree we continue use the existing > ptp_clock_register() API, for example, change my driver like below: The problem is that it will increase the technical debt. What about sending with NULL handled variant together with an RFC/RFT that finishes the optional PTP support? > dt->ptp_clock = ptp_clock_register(&dt->ptp_clock_ops, dev); ret = PTR_ERR_OR_ZERO(...); if (ret) return ... ? > if (IS_ERR_OR_NULL(dt->ptp_clock)) > return dev_err_probe(dt->dev, IS_ERR_OR_NULL(dt->ptp_clock), > "Unable to register PTP clock\n"); -- With Best Regards, Andy Shevchenko