[PATCH] docs: ABI: sysfs-tty: close times are in hundredths of a second

Simon Arlott posted 1 patch 2 years, 3 months ago
Documentation/ABI/testing/sysfs-tty | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
[PATCH] docs: ABI: sysfs-tty: close times are in hundredths of a second
Posted by Simon Arlott 2 years, 3 months ago
The times for close_delay and closing_wait are in hundredths of a
second, not milliseconds. Fix the documentation instead of trying
to use millisecond values (which would have to be rounded).

Signed-off-by: Simon Arlott <simon@octiron.net>
---
If you'd prefer, I can fold the second part of this into my previous
patch which shouldn't have documented it as milliseconds in the first
place (but I copied it from the other entry).

 Documentation/ABI/testing/sysfs-tty | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty
index e04e322af568..6ee878771f51 100644
--- a/Documentation/ABI/testing/sysfs-tty
+++ b/Documentation/ABI/testing/sysfs-tty
@@ -87,7 +87,8 @@ What:		/sys/class/tty/ttyS<x>/close_delay
 Date:		October 2012
 Contact:	Alan Cox <alan@linux.intel.com>
 Description:
-		 Show the closing delay time for this port in ms.
+		 Show the closing delay time for this port in hundredths
+		 of a second.
 
 		 These sysfs values expose the TIOCGSERIAL interface via
 		 sysfs rather than via ioctls.
@@ -96,7 +97,8 @@ What:		/sys/class/tty/ttyS<x>/closing_wait
 Date:		October 2012
 Contact:	Alan Cox <alan@linux.intel.com>
 Description:
-		 Show the close wait time for this port in ms.
+		 Show the close wait time for this port in hundredths of
+		 a second.
 
 		 These sysfs values expose the TIOCGSERIAL interface via
 		 sysfs rather than via ioctls.
@@ -166,7 +168,8 @@ What:		/sys/class/tty/ttyACM0/close_delay
 Date:		August 2023
 Contact:	linux-usb@vger.kernel.org
 Description:
-		Set the closing delay time for this port in ms.
+		Set the closing delay time for this port in hundredths of a
+		second.
 
 		These sysfs values expose the TIOCGSERIAL interface via
 		sysfs rather than via ioctls.
@@ -175,7 +178,8 @@ What:		/sys/class/tty/ttyACM0/closing_wait
 Date:		August 2023
 Contact:	linux-usb@vger.kernel.org
 Description:
-		Set the close wait time for this port in ms.
+		Set the close wait time for this port in hundredths of a
+		second.
 
 		These sysfs values expose the TIOCGSERIAL interface via
 		sysfs rather than via ioctls.
-- 
2.37.0

-- 
Simon Arlott
Re: [PATCH] docs: ABI: sysfs-tty: close times are in hundredths of a second
Posted by Jiri Slaby 2 years, 3 months ago
On 24. 08. 23, 9:18, Simon Arlott wrote:
> The times for close_delay and closing_wait are in hundredths of a
> second, not milliseconds. Fix the documentation instead of trying
> to use millisecond values (which would have to be rounded).
> 
> Signed-off-by: Simon Arlott <simon@octiron.net>
> ---
> If you'd prefer, I can fold the second part of this into my previous
> patch which shouldn't have documented it as milliseconds in the first
> place (but I copied it from the other entry).
> 
>   Documentation/ABI/testing/sysfs-tty | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty
> index e04e322af568..6ee878771f51 100644
> --- a/Documentation/ABI/testing/sysfs-tty
> +++ b/Documentation/ABI/testing/sysfs-tty
> @@ -87,7 +87,8 @@ What:		/sys/class/tty/ttyS<x>/close_delay
>   Date:		October 2012
>   Contact:	Alan Cox <alan@linux.intel.com>
>   Description:
> -		 Show the closing delay time for this port in ms.
> +		 Show the closing delay time for this port in hundredths
> +		 of a second.
>   
>   		 These sysfs values expose the TIOCGSERIAL interface via
>   		 sysfs rather than via ioctls.
> @@ -96,7 +97,8 @@ What:		/sys/class/tty/ttyS<x>/closing_wait
>   Date:		October 2012
>   Contact:	Alan Cox <alan@linux.intel.com>
>   Description:
> -		 Show the close wait time for this port in ms.
> +		 Show the close wait time for this port in hundredths of
> +		 a second.
>   
>   		 These sysfs values expose the TIOCGSERIAL interface via
>   		 sysfs rather than via ioctls.

Could you send these two hunks as a separate patch? It's correct 
regardless of your other patch.

And I would use "centiseconds" instead, which is used (IMO) in these cases.

thanks,
-- 
js
suse labs
[PATCH (v2)] docs: ABI: sysfs-tty: close times are in centiseconds
Posted by Simon Arlott 2 years, 3 months ago
The times for close_delay and closing_wait are in centiseconds, not
milliseconds. Fix the documentation and add details of special values.

Signed-off-by: Simon Arlott <simon@octiron.net>
---
On 25/08/2023 06:33, Jiri Slaby wrote:
> And I would use "centiseconds" instead, which is used (IMO) in these cases.

It's used in a few places, but the documentation has no "centiseconds"
and a couple of "hundredths". I've changed it anyway.

 Documentation/ABI/testing/sysfs-tty | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty
index 820e412d38a8..895c47f05f6f 100644
--- a/Documentation/ABI/testing/sysfs-tty
+++ b/Documentation/ABI/testing/sysfs-tty
@@ -87,19 +87,22 @@ What:		/sys/class/tty/ttyS<x>/close_delay
 Date:		October 2012
 Contact:	Alan Cox <alan@linux.intel.com>
 Description:
-		 Show the closing delay time for this port in ms.
+		Show the closing delay time for this port in centiseconds.
 
-		 These sysfs values expose the TIOCGSERIAL interface via
-		 sysfs rather than via ioctls.
+		These sysfs values expose the TIOCGSERIAL interface via
+		sysfs rather than via ioctls.
 
 What:		/sys/class/tty/ttyS<x>/closing_wait
 Date:		October 2012
 Contact:	Alan Cox <alan@linux.intel.com>
 Description:
-		 Show the close wait time for this port in ms.
+		Show the close wait time for this port in centiseconds.
 
-		 These sysfs values expose the TIOCGSERIAL interface via
-		 sysfs rather than via ioctls.
+		Waiting forever is represented as 0. If waiting on close is
+		disabled then the value is 65535.
+
+		These sysfs values expose the TIOCGSERIAL interface via
+		sysfs rather than via ioctls.
 
 What:		/sys/class/tty/ttyS<x>/custom_divisor
 Date:		October 2012
-- 
2.37.0

-- 
Simon Arlott