From: Rodolfo Giometti <giometti@enneenne.com>
To: "Hall, Christopher S" <christopher.s.hall@intel.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg KH <greg@kroah.com>, "corbet@lwn.net" <corbet@lwn.net>,
"Mohan, Subramanian" <subramanian.mohan@intel.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"andriy.shevchenko@linux.intel.com"
<andriy.shevchenko@linux.intel.com>,
"Dong, Eddie" <eddie.dong@intel.com>,
"N, Pandith" <pandith.n@intel.com>,
"T R, Thejesh Reddy" <thejesh.reddy.t.r@intel.com>,
"Zage, David" <david.zage@intel.com>,
"Chinnadurai, Srinivasan" <srinivasan.chinnadurai@intel.com>
Subject: Re: [RFC 1/3] drivers pps: add PPS generators support
Date: Wed, 9 Oct 2024 10:48:37 +0200 [thread overview]
Message-ID: <d8e9b91f-65fb-4b71-b586-998fbf914b0a@enneenne.com> (raw)
In-Reply-To: <MW4PR11MB698415531AEF2041384989FBC27F2@MW4PR11MB6984.namprd11.prod.outlook.com>
On 09/10/24 04:49, Hall, Christopher S wrote:
> Hi Rudolfo,
>
>> -----Original Message-----
>> From: Rodolfo Giometti <giometti@enneenne.com>
>> Sent: Tuesday, October 08, 2024 6:51 AM
>> To: linux-doc@vger.kernel.org; linux-kernel@vger.kernel.org
>
>> Sometimes one needs to be able not only to catch PPS signals but to
>> produce them also. For example, running a distributed simulation,
>> which requires computers' clock to be synchronized very tightly.
>>
>> This patch adds PPS generators class in order to have a well-defined
>> interface for these devices.
>>
>> Signed-off-by: Rodolfo Giometti <giometti@enneenne.com>
>> ---
>> drivers/pps/Makefile | 3 +-
>> drivers/pps/generators/Kconfig | 19 +-
>> drivers/pps/generators/Makefile | 4 +
>> drivers/pps/generators/pps_gen-dummy.c | 83 ++++++++
>> drivers/pps/generators/pps_gen.c | 283 +++++++++++++++++++++++++
>> drivers/pps/generators/sysfs.c | 89 ++++++++
>> include/linux/pps_gen_kernel.h | 57 +++++
>> include/uapi/linux/pps_gen.h | 35 +++
>> 8 files changed, 571 insertions(+), 2 deletions(-)
>> create mode 100644 drivers/pps/generators/pps_gen-dummy.c
>> create mode 100644 drivers/pps/generators/pps_gen.c
>> create mode 100644 drivers/pps/generators/sysfs.c
>> create mode 100644 include/linux/pps_gen_kernel.h
>> create mode 100644 include/uapi/linux/pps_gen.h
>
> This looks pretty good to me. I would like to see an alarm callback. We are able
> to detect a missed event and rather than stopping inexplicably or writing to the
> system log, it would be better to be able to notify an application directly.
>
> Off the top of my head, something like:
>
> void pps_gen_alarm(pps_gen_device *pps_gen) {
> pps_gen->alarm = 1;
> sysfs_notify(pps_gen->dev->kobj, NULL, "alarm");
> }
>
> The device is reset by disabling/enabling and this resets the alarm flag.
>
> Could we add something like this?
Yes, of course. But it's better to provide a proper patch against my patchset V1
(I'm going to anticipate them to you shortly), since I'm not sure to understand
what you need.
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming
next prev parent reply other threads:[~2024-10-09 8:51 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 13:50 [RFC 0/3] Add PPS generators Rodolfo Giometti
2024-10-08 13:50 ` [RFC 1/3] drivers pps: add PPS generators support Rodolfo Giometti
2024-10-08 15:42 ` Greg KH
2024-10-09 8:48 ` Rodolfo Giometti
2024-10-09 9:19 ` Greg KH
2024-10-10 7:25 ` Rodolfo Giometti
2024-10-10 7:15 ` Greg KH
2024-10-10 7:32 ` Rodolfo Giometti
2024-10-10 7:54 ` Greg KH
2024-10-10 9:53 ` Rodolfo Giometti
2024-10-10 10:04 ` Greg KH
2024-10-10 10:18 ` Rodolfo Giometti
2024-10-09 2:49 ` Hall, Christopher S
2024-10-09 8:48 ` Rodolfo Giometti [this message]
2024-10-08 13:50 ` [RFC 2/3] Documentation pps.rst: add PPS generators documentation Rodolfo Giometti
2024-10-08 15:43 ` Greg KH
2024-10-09 8:48 ` Rodolfo Giometti
2024-10-09 9:14 ` Greg KH
2024-10-10 7:26 ` Rodolfo Giometti
2024-10-08 13:50 ` [RFC 3/3] Documentation ABI: add PPS generators documentaion Rodolfo Giometti
2024-10-08 15:43 ` Greg KH
2024-10-09 8:48 ` Rodolfo Giometti
2024-10-09 9:15 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8e9b91f-65fb-4b71-b586-998fbf914b0a@enneenne.com \
--to=giometti@enneenne.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=christopher.s.hall@intel.com \
--cc=corbet@lwn.net \
--cc=david.zage@intel.com \
--cc=eddie.dong@intel.com \
--cc=greg@kroah.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pandith.n@intel.com \
--cc=srinivasan.chinnadurai@intel.com \
--cc=subramanian.mohan@intel.com \
--cc=tglx@linutronix.de \
--cc=thejesh.reddy.t.r@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®