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 4DC9DC61DA4 for ; Mon, 6 Feb 2023 10:46:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbjBFKqm (ORCPT ); Mon, 6 Feb 2023 05:46:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjBFKql (ORCPT ); Mon, 6 Feb 2023 05:46:41 -0500 Received: from smtpcmd0642.aruba.it (smtpcmd0642.aruba.it [62.149.156.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6984D6E98 for ; Mon, 6 Feb 2023 02:46:39 -0800 (PST) Received: from [192.168.1.56] ([79.0.204.227]) by Aruba Outgoing Smtp with ESMTPSA id Oz19pgLlpv78AOz19p7chI; Mon, 06 Feb 2023 11:46:36 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1675680396; bh=A4yP1CKLaZ8NLbdUTIw5ph3K/9y9Q3otLcga3VvQY4A=; h=Date:MIME-Version:Subject:To:From:Content-Type; b=LsVR3CgfZXJ5WdQqk+XTtI1Il4WtOuzbPvjW+CdonUQZfJWWY7xK7p/r8+QAVB5qK Tm/kfuXL8DZtBOjhb5HJ8n02n/Ykhdy1m4o2B8i1SppUtYViTnz1/ARfqorzoN48CE C9a5GOxisj0PtKNmgOj0wBtLf/OfcKXMKx38jtffl92l0Ka7sLk+VfYE0WhQmXt6gG FAJimVhxpUSEwEr5keDL+TyTG6uYoUcJ+x6EJ+cwiIzFG2qzu+ThBRrAyWxkgHudsM pQ6Myv6DAq5QSE5Z7nM9ehH442Xuo+76Wf6DwWhttAdzJu3VeMuMCS/PPS7KjRsPib g64Be62toYAXg== Message-ID: Date: Mon, 6 Feb 2023 11:46:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: PPS functionality for Intel Timed I/O Content-Language: en-US To: "N, Pandith" Cc: "linux-kernel@vger.kernel.org" , "Sangannavar, Mallikarjunappa" , "D, Lakshmi Sowjanya" , "T R, Thejesh Reddy" , "Hall, Christopher S" References: <1e02cc71-baee-1e75-9160-062d563af795@enneenne.com> From: Rodolfo Giometti In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfOG4BnWq84EO12EY+RsEsyEGsiqNkTSAbOCuq9RGPdrbw6c0EaF129RCyslEzMiAy3X7vc80Ik/6r5fHIAzDx1LYqFq+OaSerRlQk61WZC65QKqlSMnk yNDnzOq5gttrUt20v0XKJqpG+qljV+95jktkKDhnHRQs6e2TXXWeEtnFeTyR3jHzKduDu36axZpxvOd49AlgM5rDLVjKLJZ6mGnkXS1gVP+e3yuQFV7Nkfu3 vf2Pm7zE7RE8dDdmBZFQla8pMu0emlqaISa4Y6G3gbUNGO85cS3tuydqNoPn7AIgRZvLvk5VgW/VWM7fSlXRU7iS13PZttCQfHQeKHO/b54shY3Vfqg7buI5 /1BHmAuBF+tiPOgO7V4aXAYGzxVKSRHvtBjpzEJRAKcxP1Qgo0DX9HmRBW46wTSd+QJaxWTx Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/02/23 11:16, N, Pandith wrote: > Hi Rodolfo, Hi >> -----Original Message----- >> From: Rodolfo Giometti >> Sent: Monday, January 30, 2023 7:57 PM >> To: N, Pandith >> Cc: linux-kernel@vger.kernel.org; Sangannavar, Mallikarjunappa >> ; D, Lakshmi Sowjanya >> ; T R, Thejesh Reddy >> ; Hall, Christopher S >> >> Subject: Re: PPS functionality for Intel Timed I/O >> Within kernel sources PPS clients and PPS generators are placed into different >> directories, so I suppose is better to deploy two different pieces of code. >> > We are planning to add a new PPS generator driver in drivers/pps/generators > i) Can this driver use pps_register_source to register Intel Timed I/O device for pulse generation ? Nope. This function is for pps clients only. PPS generators should generate their pulses according to system clock so they don't needed any registrations at all under PPS layer. > ii) To start/stop pulse, we are planning to add additional sysfs attribute from our main driver. > Something like : /sys/class/ppsX/enable_pin > This is needed for users to start/stop pulse generation. If you are still talking about PPS generators they have no entries under /sys/class/ppsX/ (just clients have). So you can add an entry under your driver to do so. >> However pay attention to the fact that a PPS generator should be referred to >> system's main clock and not to peripherals' clock. >> > We can sync with the system time for pulse generation. Mmm... I'm not sure this is correct since PPS generators should generate their pulses according to system clock and not according to their internal clocks even if they are synced with the system clock. Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti@enneenne.com Linux Device Driver giometti@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti