[RFC 3/3] Documentation ABI: add PPS generators documentaion

Rodolfo Giometti posted 3 patches 1 month, 2 weeks ago
There is a newer version of this series
[RFC 3/3] Documentation ABI: add PPS generators documentaion
Posted by Rodolfo Giometti 1 month, 2 weeks ago
This patch adds the documentation for the ABI between the Linux kernel
and userspace regarding the PPS generators.

Signed-off-by: Rodolfo Giometti <giometti@enneenne.com>
---
 Documentation/ABI/testing/sysfs-pps-gen | 44 +++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-pps-gen

diff --git a/Documentation/ABI/testing/sysfs-pps-gen b/Documentation/ABI/testing/sysfs-pps-gen
new file mode 100644
index 000000000000..9ad066cb3ce5
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-pps-gen
@@ -0,0 +1,44 @@
+What:		/sys/class/pps-gen/
+Date:		October 2024
+Contact:	Rodolfo Giometti <giometti@enneenne.com>
+Description:
+		The /sys/class/pps-gen/ directory will contain files and
+		directories that will provide a unified interface to
+		the PPS generators.
+
+What:		/sys/class/pps-gen/pps-genX/
+Date:		October 2024
+Contact:	Rodolfo Giometti <giometti@enneenne.com>
+Description:
+		The /sys/class/pps-gen/pps-genX/ directory is related to X-th
+		PPS generator into the system. Each directory will
+		contain files to manage and control its PPS generator.
+
+What:		/sys/class/pps-gen/pps-genX/enable
+Date:		October 2024
+Contact:	Rodolfo Giometti <giometti@enneenne.com>
+Description:
+		This write-only file enables or disables generation of the
+		PPS signal.
+
+What:		/sys/class/pps-gen/pps-genX/name
+Date:		October 2024
+Contact:	Rodolfo Giometti <giometti@enneenne.com>
+Description:
+		This read-only file reports the name of the X-th generator.
+
+What:		/sys/class/pps-gen/pps-genX/system
+Date:		October 2024
+Contact:	Rodolfo Giometti <giometti@enneenne.com>
+Description:
+		This read-only file returns "1" if the generator takes the
+		timing from the system clock, while it returns "0" if not
+		(i.e. from a peripheral device clock).
+
+What:		/sys/class/pps-gen/pps-genX/time
+Date:		October 2024
+Contact:	Rodolfo Giometti <giometti@enneenne.com>
+Description:
+		This read-only file contains the current time stored into the
+		generator clock as two integers representing the current time
+		seconds and nanoseconds. 
-- 
2.34.1
Re: [RFC 3/3] Documentation ABI: add PPS generators documentaion
Posted by Greg KH 1 month, 2 weeks ago
On Tue, Oct 08, 2024 at 03:50:33PM +0200, Rodolfo Giometti wrote:
> This patch adds the documentation for the ABI between the Linux kernel
> and userspace regarding the PPS generators.
> 
> Signed-off-by: Rodolfo Giometti <giometti@enneenne.com>
> ---
>  Documentation/ABI/testing/sysfs-pps-gen | 44 +++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-pps-gen
> 
> diff --git a/Documentation/ABI/testing/sysfs-pps-gen b/Documentation/ABI/testing/sysfs-pps-gen
> new file mode 100644
> index 000000000000..9ad066cb3ce5
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-pps-gen
> @@ -0,0 +1,44 @@
> +What:		/sys/class/pps-gen/
> +Date:		October 2024
> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> +Description:
> +		The /sys/class/pps-gen/ directory will contain files and
> +		directories that will provide a unified interface to
> +		the PPS generators.
> +
> +What:		/sys/class/pps-gen/pps-genX/
> +Date:		October 2024
> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> +Description:
> +		The /sys/class/pps-gen/pps-genX/ directory is related to X-th
> +		PPS generator into the system. Each directory will
> +		contain files to manage and control its PPS generator.
> +
> +What:		/sys/class/pps-gen/pps-genX/enable
> +Date:		October 2024
> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> +Description:
> +		This write-only file enables or disables generation of the
> +		PPS signal.
> +
> +What:		/sys/class/pps-gen/pps-genX/name
> +Date:		October 2024
> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> +Description:
> +		This read-only file reports the name of the X-th generator.

Again, why a name?  What is that for?

> +
> +What:		/sys/class/pps-gen/pps-genX/system
> +Date:		October 2024
> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> +Description:
> +		This read-only file returns "1" if the generator takes the
> +		timing from the system clock, while it returns "0" if not
> +		(i.e. from a peripheral device clock).
> +
> +What:		/sys/class/pps-gen/pps-genX/time
> +Date:		October 2024
> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> +Description:
> +		This read-only file contains the current time stored into the
> +		generator clock as two integers representing the current time
> +		seconds and nanoseconds. 

Trailing whitespace, please always run checkpatch.pl.

thanks,

greg k-h
Re: [RFC 3/3] Documentation ABI: add PPS generators documentaion
Posted by Rodolfo Giometti 1 month, 2 weeks ago
On 08/10/24 17:43, Greg KH wrote:
> On Tue, Oct 08, 2024 at 03:50:33PM +0200, Rodolfo Giometti wrote:
>> This patch adds the documentation for the ABI between the Linux kernel
>> and userspace regarding the PPS generators.
>>
>> Signed-off-by: Rodolfo Giometti <giometti@enneenne.com>
>> ---
>>   Documentation/ABI/testing/sysfs-pps-gen | 44 +++++++++++++++++++++++++
>>   1 file changed, 44 insertions(+)
>>   create mode 100644 Documentation/ABI/testing/sysfs-pps-gen
>>
>> diff --git a/Documentation/ABI/testing/sysfs-pps-gen b/Documentation/ABI/testing/sysfs-pps-gen
>> new file mode 100644
>> index 000000000000..9ad066cb3ce5
>> --- /dev/null
>> +++ b/Documentation/ABI/testing/sysfs-pps-gen
>> @@ -0,0 +1,44 @@
>> +What:		/sys/class/pps-gen/
>> +Date:		October 2024
>> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
>> +Description:
>> +		The /sys/class/pps-gen/ directory will contain files and
>> +		directories that will provide a unified interface to
>> +		the PPS generators.
>> +
>> +What:		/sys/class/pps-gen/pps-genX/
>> +Date:		October 2024
>> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
>> +Description:
>> +		The /sys/class/pps-gen/pps-genX/ directory is related to X-th
>> +		PPS generator into the system. Each directory will
>> +		contain files to manage and control its PPS generator.
>> +
>> +What:		/sys/class/pps-gen/pps-genX/enable
>> +Date:		October 2024
>> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
>> +Description:
>> +		This write-only file enables or disables generation of the
>> +		PPS signal.
>> +
>> +What:		/sys/class/pps-gen/pps-genX/name
>> +Date:		October 2024
>> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
>> +Description:
>> +		This read-only file reports the name of the X-th generator.
> 
> Again, why a name?  What is that for?

This can be useful in order to distinguish between different PPS generators in 
the system.

For example, the PARPORT generator is not very precise, and userspace 
applications should be able to know which generator corresponds to the device 
/dev/pps-gen0 or /dev/pps-gen1, etc.

> 
>> +
>> +What:		/sys/class/pps-gen/pps-genX/system
>> +Date:		October 2024
>> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
>> +Description:
>> +		This read-only file returns "1" if the generator takes the
>> +		timing from the system clock, while it returns "0" if not
>> +		(i.e. from a peripheral device clock).
>> +
>> +What:		/sys/class/pps-gen/pps-genX/time
>> +Date:		October 2024
>> +Contact:	Rodolfo Giometti <giometti@enneenne.com>
>> +Description:
>> +		This read-only file contains the current time stored into the
>> +		generator clock as two integers representing the current time
>> +		seconds and nanoseconds.
> 
> Trailing whitespace, please always run checkpatch.pl.

Fixed.

Ciao,

Rodolfo

-- 
GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming
Re: [RFC 3/3] Documentation ABI: add PPS generators documentaion
Posted by Greg KH 1 month, 2 weeks ago
On Wed, Oct 09, 2024 at 10:48:23AM +0200, Rodolfo Giometti wrote:
> On 08/10/24 17:43, Greg KH wrote:
> > On Tue, Oct 08, 2024 at 03:50:33PM +0200, Rodolfo Giometti wrote:
> > > This patch adds the documentation for the ABI between the Linux kernel
> > > and userspace regarding the PPS generators.
> > > 
> > > Signed-off-by: Rodolfo Giometti <giometti@enneenne.com>
> > > ---
> > >   Documentation/ABI/testing/sysfs-pps-gen | 44 +++++++++++++++++++++++++
> > >   1 file changed, 44 insertions(+)
> > >   create mode 100644 Documentation/ABI/testing/sysfs-pps-gen
> > > 
> > > diff --git a/Documentation/ABI/testing/sysfs-pps-gen b/Documentation/ABI/testing/sysfs-pps-gen
> > > new file mode 100644
> > > index 000000000000..9ad066cb3ce5
> > > --- /dev/null
> > > +++ b/Documentation/ABI/testing/sysfs-pps-gen
> > > @@ -0,0 +1,44 @@
> > > +What:		/sys/class/pps-gen/
> > > +Date:		October 2024
> > > +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> > > +Description:
> > > +		The /sys/class/pps-gen/ directory will contain files and
> > > +		directories that will provide a unified interface to
> > > +		the PPS generators.
> > > +
> > > +What:		/sys/class/pps-gen/pps-genX/
> > > +Date:		October 2024
> > > +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> > > +Description:
> > > +		The /sys/class/pps-gen/pps-genX/ directory is related to X-th
> > > +		PPS generator into the system. Each directory will
> > > +		contain files to manage and control its PPS generator.
> > > +
> > > +What:		/sys/class/pps-gen/pps-genX/enable
> > > +Date:		October 2024
> > > +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> > > +Description:
> > > +		This write-only file enables or disables generation of the
> > > +		PPS signal.
> > > +
> > > +What:		/sys/class/pps-gen/pps-genX/name
> > > +Date:		October 2024
> > > +Contact:	Rodolfo Giometti <giometti@enneenne.com>
> > > +Description:
> > > +		This read-only file reports the name of the X-th generator.
> > 
> > Again, why a name?  What is that for?
> 
> This can be useful in order to distinguish between different PPS generators
> in the system.
> 
> For example, the PARPORT generator is not very precise, and userspace
> applications should be able to know which generator corresponds to the
> device /dev/pps-gen0 or /dev/pps-gen1, etc.

That's what the device symlink in the directory is for, no need to pick
yet-another-random-name to have to read from a file :)

thanks,

greg k-h