linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] soc: qcom: dcc: Documentation improv
@ 2022-12-30 13:50 Bagas Sanjaya
  2022-12-30 13:50 ` [PATCH 1/2] soc: qcom: dcc: Fix examples list on /sys/kernel/debug/dcc/.../[list-number]/config documentation Bagas Sanjaya
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Bagas Sanjaya @ 2022-12-30 13:50 UTC (permalink / raw)
  To: linux-arm-msm, linux-kernel, Linux Documentation, Linux ARM, Devicetree
  Cc: Souradeep Chowdhury, Alex Elder, Bjorn Andersson, Andy Gross,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring,
	Sai Prakash Ranjan, Sibi Sankar, Rajendra Nayak, Vinod Koul,
	Bagas Sanjaya

The DCC (Data Capture and Compare) patchset was sent and partially
merged [1] without Cc'ing linux-doc list for documentation review.
kernel test robot [2] noted htmldocs warnings as a result, which is fixed
in [1/2]. Later, when inspecting the sysfs description, the wording
could have been improved ([2/2]). So here is the improv series.

[1]: https://lore.kernel.org/lkml/cover.1672148732.git.quic_schowdhu@quicinc.com/
[2]: https://lore.kernel.org/linux-doc/202212300426.eMLsZsvA-lkp@intel.com/

Bagas Sanjaya (2):
  soc: qcom: dcc: Fix examples list on
    /sys/kernel/debug/dcc/.../[list-number]/config documentation
  soc: qcom: dcc: rewrite description of dcc sysfs files

 Documentation/ABI/testing/debugfs-driver-dcc | 163 +++++++++++--------
 1 file changed, 96 insertions(+), 67 deletions(-)


base-commit: f02a537357a61e7892587c0f3455f8295cc9075c
-- 
An old man doll... just what I always wanted! - Clara


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] soc: qcom: dcc: Fix examples list on /sys/kernel/debug/dcc/.../[list-number]/config documentation
  2022-12-30 13:50 [PATCH 0/2] soc: qcom: dcc: Documentation improv Bagas Sanjaya
@ 2022-12-30 13:50 ` Bagas Sanjaya
  2023-01-05  5:04   ` Souradeep Chowdhury
  2022-12-30 13:50 ` [PATCH 2/2] soc: qcom: dcc: rewrite description of dcc sysfs files Bagas Sanjaya
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Bagas Sanjaya @ 2022-12-30 13:50 UTC (permalink / raw)
  To: linux-arm-msm, linux-kernel, Linux Documentation, Linux ARM, Devicetree
  Cc: Souradeep Chowdhury, Alex Elder, Bjorn Andersson, Andy Gross,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring,
	Sai Prakash Ranjan, Sibi Sankar, Rajendra Nayak, Vinod Koul,
	Bagas Sanjaya, kernel test robot

kernel test robot reported htmldocs warnings:

Documentation/ABI/testing/debugfs-driver-dcc:34: WARNING: Unexpected indentation.
Documentation/ABI/testing/debugfs-driver-dcc:34: WARNING: Block quote ends without a blank line; unexpected unindent.

Fix these by fixing numbered list syntax on description of
/sys/kernel/debug/dcc/.../[list-number]/config, including adding blank line
separators as appropriate.

Link: https://lore.kernel.org/linux-doc/202212300426.eMLsZsvA-lkp@intel.com/
Fixes: 4cbe60cf5ad622 ("soc: qcom: dcc: Add driver support for Data Capture and Compare unit(DCC)")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/ABI/testing/debugfs-driver-dcc | 63 +++++++++++++-------
 1 file changed, 41 insertions(+), 22 deletions(-)

diff --git a/Documentation/ABI/testing/debugfs-driver-dcc b/Documentation/ABI/testing/debugfs-driver-dcc
index a4680950205931..a00f4502885b58 100644
--- a/Documentation/ABI/testing/debugfs-driver-dcc
+++ b/Documentation/ABI/testing/debugfs-driver-dcc
@@ -44,35 +44,54 @@ Description:
 		example user can jump to list x only after list y is
 		configured and enabled. The format for entering all
 		types of instructions are explained in examples as
-		follows.
-		Example:
-	         i)Read Type Instruction
+		follows:
+
+	        i) Read Type Instruction
+
 		   echo R <1> <2> <3> >/sys/kernel/debug/dcc/../[list-number]/config
+
 		   1->Address to be considered for reading the value.
+
 		   2->The word count of the addresses, read n words
 		      starting from address <1>. Each word is of 32 bits.
 		      If not entered 1 is considered.
+
 		   3->Can be 'apb' or 'ahb' which indicates if it is apb or ahb
 		      bus respectively. If not entered ahb is considered.
-		ii)Write Type Instruction
-		   echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
-		   1->Address to be considered for writing the value.
-		   2->The value that needs to be written at the location.
-		   3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb
-		      but respectively.
-	       iii)Read Modify Write type instruction
-		   echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
-		   1->The address which needs to be considered for read then write.
-		   2->The value that needs to be written on the address.
-		   3->The mask of the value to be written.
-		iv)Loop Type Instruction
-		   echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
-		   1->The loop count, the number of times the value of the addresses will be
-		      captured.
-		   2->The address count, total number of addresses to be entered in this
-		      instruction.
-		   3->The series of addresses to be entered separated by a space like <addr1>
-		      <addr2>... and so on.
+
+		ii) Write Type Instruction
+
+		    echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
+
+		    1->Address to be considered for writing the value.
+
+		    2->The value that needs to be written at the location.
+
+		    3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb
+		       but respectively.
+
+	        iii) Read Modify Write type instruction
+
+		     echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
+
+		     1->The address which needs to be considered for read then write.
+
+		     2->The value that needs to be written on the address.
+
+		     3->The mask of the value to be written.
+
+		iv) Loop Type Instruction
+
+		    echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
+
+		    1->The loop count, the number of times the value of the addresses will be
+		       captured.
+
+		    2->The address count, total number of addresses to be entered in this
+		       instruction.
+
+		    3->The series of addresses to be entered separated by a space like <addr1>
+		       <addr2>... and so on.
 
 What:           /sys/kernel/debug/dcc/.../[list-number]/enable
 Date:           December 2022
-- 
An old man doll... just what I always wanted! - Clara


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] soc: qcom: dcc: rewrite description of dcc sysfs files
  2022-12-30 13:50 [PATCH 0/2] soc: qcom: dcc: Documentation improv Bagas Sanjaya
  2022-12-30 13:50 ` [PATCH 1/2] soc: qcom: dcc: Fix examples list on /sys/kernel/debug/dcc/.../[list-number]/config documentation Bagas Sanjaya
@ 2022-12-30 13:50 ` Bagas Sanjaya
  2023-01-05  5:17   ` Souradeep Chowdhury
  2023-01-05  3:33 ` [PATCH 0/2] soc: qcom: dcc: Documentation improv Bagas Sanjaya
  2023-01-07  0:08 ` Bjorn Andersson
  3 siblings, 1 reply; 7+ messages in thread
From: Bagas Sanjaya @ 2022-12-30 13:50 UTC (permalink / raw)
  To: linux-arm-msm, linux-kernel, Linux Documentation, Linux ARM, Devicetree
  Cc: Souradeep Chowdhury, Alex Elder, Bjorn Andersson, Andy Gross,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring,
	Sai Prakash Ranjan, Sibi Sankar, Rajendra Nayak, Vinod Koul,
	Bagas Sanjaya

The description of dcc sysfs files is somewhat confusing and not effective.
Rewrite it to be clear.

While at it, also use literal code block for config sysfs examples and
remove redundant examples that are obvious.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/ABI/testing/debugfs-driver-dcc | 142 ++++++++++---------
 1 file changed, 76 insertions(+), 66 deletions(-)

diff --git a/Documentation/ABI/testing/debugfs-driver-dcc b/Documentation/ABI/testing/debugfs-driver-dcc
index a00f4502885b58..27ed5919d21b9c 100644
--- a/Documentation/ABI/testing/debugfs-driver-dcc
+++ b/Documentation/ABI/testing/debugfs-driver-dcc
@@ -3,115 +3,125 @@ Date:           December 2022
 Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
 Description:
 		This file is used to check the status of the dcc
-		hardware if it's ready to take the inputs. A 'Y'
-		here indicates dcc is in a ready condition.
-		Example:
-		cat /sys/kernel/debug/dcc/.../ready
+		hardware if it's ready to receive user configurations.
+		A 'Y' here indicates dcc is ready.
 
 What:           /sys/kernel/debug/dcc/.../trigger
 Date:           December 2022
 Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
 Description:
 		This is the debugfs interface for manual software
-		triggers. The user can simply enter a 1 against
-		the debugfs file and enable a manual trigger.
-		Example:
-		echo  1 > /sys/kernel/debug/dcc/.../trigger
+		triggers. The trigger can be invoked by writing '1'
+		to the file.
 
 What:           /sys/kernel/debug/dcc/.../config_reset
 Date:           December 2022
 Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
 Description:
 		This file is used to reset the configuration of
-		a dcc driver to the default configuration. This
-		means that all the previous addresses stored in
-		the driver gets removed and user needs to enter
-		the address values from the start.
-		Example:
-		echo  1 > /sys/kernel/debug/dcc/../config_reset
+		a dcc driver to the default configuration. When '1'
+		is written to the file, all the previous addresses
+		stored in the driver gets removed and users need to
+		reconfigure addresses again.
 
 What:           /sys/kernel/debug/dcc/.../[list-number]/config
 Date:		 December 2022
 Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
 Description:
 		This stores the addresses of the registers which
-		should be read in case of a hardware crash or
-		manual software triggers. The addresses entered here
-		are considered under all the 4 types of dcc
-		instructions Read type, Write type, Read Modify Write
-		type and Loop type. The lists need to be configured
-		sequentially and not in a overlapping manner. As an
-		example user can jump to list x only after list y is
-		configured and enabled. The format for entering all
-		types of instructions are explained in examples as
-		follows:
+		can be read in case of a hardware crash or manual
+		software triggers. The input addresses type
+		can be one of following dcc instructions: read,
+		write, read-write, and loop type. The lists need to
+		be configured sequentially and not in a overlapping
+		manner; e.g. users can jump to list x only after
+		list y is configured and enabled. The input format for
+		each type is as follows:
 
-	        i) Read Type Instruction
+	        i) Read instruction
 
-		   echo R <1> <2> <3> >/sys/kernel/debug/dcc/../[list-number]/config
+		   ::
 
-		   1->Address to be considered for reading the value.
+		     echo R <addr> <n> <bus> >/sys/kernel/debug/dcc/../[list-number]/config
 
-		   2->The word count of the addresses, read n words
-		      starting from address <1>. Each word is of 32 bits.
-		      If not entered 1 is considered.
+		   where:
 
-		   3->Can be 'apb' or 'ahb' which indicates if it is apb or ahb
-		      bus respectively. If not entered ahb is considered.
+		   <addr>
+			The address to be read.
 
-		ii) Write Type Instruction
+		   <n>
+			The addresses word count, starting from address <1>.
+			Each word is 32 bits (4 bytes). If omitted, defaulted
+			to 1.
 
-		    echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
+		   <bus type>
+			The bus type, which can be either 'apb' or 'ahb'.
+			The default is 'ahb' if leaved out.
 
-		    1->Address to be considered for writing the value.
+		ii) Write instruction
 
-		    2->The value that needs to be written at the location.
+		    ::
 
-		    3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb
-		       but respectively.
+		      echo W <addr> <n> <bus type> > /sys/kernel/debug/dcc/../[list-number]/config
 
-	        iii) Read Modify Write type instruction
+		    where:
 
-		     echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
+		    <addr>
+			The address to be written.
 
-		     1->The address which needs to be considered for read then write.
+		    <n>
+			The value to be written at <addr>.
 
-		     2->The value that needs to be written on the address.
+		    <bus type>
+			The bus type, which can be either 'apb' or 'ahb'.
 
-		     3->The mask of the value to be written.
+	        iii) Read-write instruction
 
-		iv) Loop Type Instruction
+		     ::
 
-		    echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
+		       echo RW <addr> <n> <mask> > /sys/kernel/debug/dcc/../[list-number]/config
 
-		    1->The loop count, the number of times the value of the addresses will be
-		       captured.
+		     where:
 
-		    2->The address count, total number of addresses to be entered in this
-		       instruction.
+		     <addr>
+			The address to be read and written.
 
-		    3->The series of addresses to be entered separated by a space like <addr1>
-		       <addr2>... and so on.
+		     <n>
+		        The value to be written at <addr>.
+
+		     <mask>
+			The value mask.
+
+		iv) Loop instruction
+
+		    ::
+
+		      echo L <loop count> <address count> <address>... > /sys/kernel/debug/dcc/../[list-number]/config
+
+		    where:
+
+		    <loop count>
+			Number of iterations
+
+		    <address count>
+			total number of addresses to be written
+
+		    <address>
+			Space-separated list of addresses.
 
 What:           /sys/kernel/debug/dcc/.../[list-number]/enable
 Date:           December 2022
 Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
 Description:
 		This debugfs interface is used for enabling the
-		the dcc hardware. Enable file is kept under the
-		directory list number for which the user wants
-		to enable it. For example if the user wants to
-		enable list 1, then he should go for
-		echo 1 > /sys/kernel/debug/dcc/.../1/enable.
-		On enabling the dcc, all the addresses entered
+		the dcc hardware. A file named "enable" is in the
+		directory list number where users can enable/disable
+		the specific list by writing boolean (1 or 0) to the
+		file.
+
+		On enabling the dcc, all the addresses specified
 		by the user for the corresponding list is written
 		into dcc sram which is read by the dcc hardware
-		on manual or crash induced triggers. Lists should
-		be enabled sequentially.For example after configuring
-		addresses for list 1 and enabling it, a user can
-		proceed to enable list 2 or vice versa.
-		Example:
-		echo  0 > /sys/kernel/debug/dcc/.../[list-number]/enable
-		(disable dcc for the corresponding list number)
-		echo  1 > /sys/kernel/debug/dcc/.../[list-number]/enable
-		(enable dcc for the corresponding list number)
+		on manual or crash induced triggers. Lists must
+		be configured and enabled sequentially, e.g. list
+		2 can only be enabled when list 1 have so.
-- 
An old man doll... just what I always wanted! - Clara


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] soc: qcom: dcc: Documentation improv
  2022-12-30 13:50 [PATCH 0/2] soc: qcom: dcc: Documentation improv Bagas Sanjaya
  2022-12-30 13:50 ` [PATCH 1/2] soc: qcom: dcc: Fix examples list on /sys/kernel/debug/dcc/.../[list-number]/config documentation Bagas Sanjaya
  2022-12-30 13:50 ` [PATCH 2/2] soc: qcom: dcc: rewrite description of dcc sysfs files Bagas Sanjaya
@ 2023-01-05  3:33 ` Bagas Sanjaya
  2023-01-07  0:08 ` Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Bagas Sanjaya @ 2023-01-05  3:33 UTC (permalink / raw)
  To: linux-arm-msm, linux-kernel, Linux Documentation, Linux ARM, Devicetree
  Cc: Souradeep Chowdhury, Alex Elder, Bjorn Andersson, Andy Gross,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring,
	Sai Prakash Ranjan, Sibi Sankar, Rajendra Nayak, Vinod Koul

[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]

On Fri, Dec 30, 2022 at 08:50:29PM +0700, Bagas Sanjaya wrote:
> The DCC (Data Capture and Compare) patchset was sent and partially
> merged [1] without Cc'ing linux-doc list for documentation review.
> kernel test robot [2] noted htmldocs warnings as a result, which is fixed
> in [1/2]. Later, when inspecting the sysfs description, the wording
> could have been improved ([2/2]). So here is the improv series.
> 
> [1]: https://lore.kernel.org/lkml/cover.1672148732.git.quic_schowdhu@quicinc.com/
> [2]: https://lore.kernel.org/linux-doc/202212300426.eMLsZsvA-lkp@intel.com/
> 
> Bagas Sanjaya (2):
>   soc: qcom: dcc: Fix examples list on
>     /sys/kernel/debug/dcc/.../[list-number]/config documentation
>   soc: qcom: dcc: rewrite description of dcc sysfs files
> 
>  Documentation/ABI/testing/debugfs-driver-dcc | 163 +++++++++++--------
>  1 file changed, 96 insertions(+), 67 deletions(-)
> 
> 
> base-commit: f02a537357a61e7892587c0f3455f8295cc9075c

Ping?

I think Stephen Rothwell still not happy today [1].

[1]: https://lore.kernel.org/lkml/20230105141326.5e339f2b@canb.auug.org.au/

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] soc: qcom: dcc: Fix examples list on /sys/kernel/debug/dcc/.../[list-number]/config documentation
  2022-12-30 13:50 ` [PATCH 1/2] soc: qcom: dcc: Fix examples list on /sys/kernel/debug/dcc/.../[list-number]/config documentation Bagas Sanjaya
@ 2023-01-05  5:04   ` Souradeep Chowdhury
  0 siblings, 0 replies; 7+ messages in thread
From: Souradeep Chowdhury @ 2023-01-05  5:04 UTC (permalink / raw)
  To: Bagas Sanjaya, linux-arm-msm, linux-kernel, Linux Documentation,
	Linux ARM, Devicetree
  Cc: Alex Elder, Bjorn Andersson, Andy Gross, Konrad Dybcio,
	Krzysztof Kozlowski, Rob Herring, Sai Prakash Ranjan,
	Sibi Sankar, Rajendra Nayak, Vinod Koul, kernel test robot



On 12/30/2022 7:20 PM, Bagas Sanjaya wrote:
> kernel test robot reported htmldocs warnings:
> 
> Documentation/ABI/testing/debugfs-driver-dcc:34: WARNING: Unexpected indentation.
> Documentation/ABI/testing/debugfs-driver-dcc:34: WARNING: Block quote ends without a blank line; unexpected unindent.
> 
> Fix these by fixing numbered list syntax on description of
> /sys/kernel/debug/dcc/.../[list-number]/config, including adding blank line
> separators as appropriate.
> 
> Link: https://lore.kernel.org/linux-doc/202212300426.eMLsZsvA-lkp@intel.com/
> Fixes: 4cbe60cf5ad622 ("soc: qcom: dcc: Add driver support for Data Capture and Compare unit(DCC)")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>   Documentation/ABI/testing/debugfs-driver-dcc | 63 +++++++++++++-------
>   1 file changed, 41 insertions(+), 22 deletions(-)
> 
> diff --git a/Documentation/ABI/testing/debugfs-driver-dcc b/Documentation/ABI/testing/debugfs-driver-dcc
> index a4680950205931..a00f4502885b58 100644
> --- a/Documentation/ABI/testing/debugfs-driver-dcc
> +++ b/Documentation/ABI/testing/debugfs-driver-dcc
> @@ -44,35 +44,54 @@ Description:
>   		example user can jump to list x only after list y is
>   		configured and enabled. The format for entering all
>   		types of instructions are explained in examples as
> -		follows.
> -		Example:
> -	         i)Read Type Instruction
> +		follows:
> +
> +	        i) Read Type Instruction
> +
>   		   echo R <1> <2> <3> >/sys/kernel/debug/dcc/../[list-number]/config
> +
>   		   1->Address to be considered for reading the value.
> +
>   		   2->The word count of the addresses, read n words
>   		      starting from address <1>. Each word is of 32 bits.
>   		      If not entered 1 is considered.
> +
>   		   3->Can be 'apb' or 'ahb' which indicates if it is apb or ahb
>   		      bus respectively. If not entered ahb is considered.
> -		ii)Write Type Instruction
> -		   echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
> -		   1->Address to be considered for writing the value.
> -		   2->The value that needs to be written at the location.
> -		   3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb
> -		      but respectively.
> -	       iii)Read Modify Write type instruction
> -		   echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
> -		   1->The address which needs to be considered for read then write.
> -		   2->The value that needs to be written on the address.
> -		   3->The mask of the value to be written.
> -		iv)Loop Type Instruction
> -		   echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
> -		   1->The loop count, the number of times the value of the addresses will be
> -		      captured.
> -		   2->The address count, total number of addresses to be entered in this
> -		      instruction.
> -		   3->The series of addresses to be entered separated by a space like <addr1>
> -		      <addr2>... and so on.
> +
> +		ii) Write Type Instruction
> +
> +		    echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
> +
> +		    1->Address to be considered for writing the value.
> +
> +		    2->The value that needs to be written at the location.
> +
> +		    3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb
> +		       but respectively.
> +
> +	        iii) Read Modify Write type instruction
> +
> +		     echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
> +
> +		     1->The address which needs to be considered for read then write.
> +
> +		     2->The value that needs to be written on the address.
> +
> +		     3->The mask of the value to be written.
> +
> +		iv) Loop Type Instruction
> +
> +		    echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
> +
> +		    1->The loop count, the number of times the value of the addresses will be
> +		       captured.
> +
> +		    2->The address count, total number of addresses to be entered in this
> +		       instruction.
> +
> +		    3->The series of addresses to be entered separated by a space like <addr1>
> +		       <addr2>... and so on.
>   
>   What:           /sys/kernel/debug/dcc/.../[list-number]/enable
>   Date:           December 2022

Acked-by:Souradeep Chowdhury <quic_schowdhu@quicinc.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] soc: qcom: dcc: rewrite description of dcc sysfs files
  2022-12-30 13:50 ` [PATCH 2/2] soc: qcom: dcc: rewrite description of dcc sysfs files Bagas Sanjaya
@ 2023-01-05  5:17   ` Souradeep Chowdhury
  0 siblings, 0 replies; 7+ messages in thread
From: Souradeep Chowdhury @ 2023-01-05  5:17 UTC (permalink / raw)
  To: Bagas Sanjaya, linux-arm-msm, linux-kernel, Linux Documentation,
	Linux ARM, Devicetree
  Cc: Alex Elder, Bjorn Andersson, Andy Gross, Konrad Dybcio,
	Krzysztof Kozlowski, Rob Herring, Sai Prakash Ranjan,
	Sibi Sankar, Rajendra Nayak, Vinod Koul



On 12/30/2022 7:20 PM, Bagas Sanjaya wrote:
> The description of dcc sysfs files is somewhat confusing and not effective.
> Rewrite it to be clear.
> 
> While at it, also use literal code block for config sysfs examples and
> remove redundant examples that are obvious.
> 
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>   Documentation/ABI/testing/debugfs-driver-dcc | 142 ++++++++++---------
>   1 file changed, 76 insertions(+), 66 deletions(-)
> 
> diff --git a/Documentation/ABI/testing/debugfs-driver-dcc b/Documentation/ABI/testing/debugfs-driver-dcc
> index a00f4502885b58..27ed5919d21b9c 100644
> --- a/Documentation/ABI/testing/debugfs-driver-dcc
> +++ b/Documentation/ABI/testing/debugfs-driver-dcc
> @@ -3,115 +3,125 @@ Date:           December 2022
>   Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
>   Description:
>   		This file is used to check the status of the dcc
> -		hardware if it's ready to take the inputs. A 'Y'
> -		here indicates dcc is in a ready condition.
> -		Example:
> -		cat /sys/kernel/debug/dcc/.../ready
> +		hardware if it's ready to receive user configurations.
> +		A 'Y' here indicates dcc is ready.
>   
>   What:           /sys/kernel/debug/dcc/.../trigger
>   Date:           December 2022
>   Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
>   Description:
>   		This is the debugfs interface for manual software
> -		triggers. The user can simply enter a 1 against
> -		the debugfs file and enable a manual trigger.
> -		Example:
> -		echo  1 > /sys/kernel/debug/dcc/.../trigger
> +		triggers. The trigger can be invoked by writing '1'
> +		to the file.
>   
>   What:           /sys/kernel/debug/dcc/.../config_reset
>   Date:           December 2022
>   Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
>   Description:
>   		This file is used to reset the configuration of
> -		a dcc driver to the default configuration. This
> -		means that all the previous addresses stored in
> -		the driver gets removed and user needs to enter
> -		the address values from the start.
> -		Example:
> -		echo  1 > /sys/kernel/debug/dcc/../config_reset
> +		a dcc driver to the default configuration. When '1'
> +		is written to the file, all the previous addresses
> +		stored in the driver gets removed and users need to
> +		reconfigure addresses again.
>   
>   What:           /sys/kernel/debug/dcc/.../[list-number]/config
>   Date:		 December 2022
>   Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
>   Description:
>   		This stores the addresses of the registers which
> -		should be read in case of a hardware crash or
> -		manual software triggers. The addresses entered here
> -		are considered under all the 4 types of dcc
> -		instructions Read type, Write type, Read Modify Write
> -		type and Loop type. The lists need to be configured
> -		sequentially and not in a overlapping manner. As an
> -		example user can jump to list x only after list y is
> -		configured and enabled. The format for entering all
> -		types of instructions are explained in examples as
> -		follows:
> +		can be read in case of a hardware crash or manual
> +		software triggers. The input addresses type
> +		can be one of following dcc instructions: read,
> +		write, read-write, and loop type. The lists need to
> +		be configured sequentially and not in a overlapping
> +		manner; e.g. users can jump to list x only after
> +		list y is configured and enabled. The input format for
> +		each type is as follows:
>   
> -	        i) Read Type Instruction
> +	        i) Read instruction
>   
> -		   echo R <1> <2> <3> >/sys/kernel/debug/dcc/../[list-number]/config
> +		   ::
>   
> -		   1->Address to be considered for reading the value.
> +		     echo R <addr> <n> <bus> >/sys/kernel/debug/dcc/../[list-number]/config
>   
> -		   2->The word count of the addresses, read n words
> -		      starting from address <1>. Each word is of 32 bits.
> -		      If not entered 1 is considered.
> +		   where:
>   
> -		   3->Can be 'apb' or 'ahb' which indicates if it is apb or ahb
> -		      bus respectively. If not entered ahb is considered.
> +		   <addr>
> +			The address to be read.
>   
> -		ii) Write Type Instruction
> +		   <n>
> +			The addresses word count, starting from address <1>.
> +			Each word is 32 bits (4 bytes). If omitted, defaulted
> +			to 1.
>   
> -		    echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
> +		   <bus type>
> +			The bus type, which can be either 'apb' or 'ahb'.
> +			The default is 'ahb' if leaved out.
>   
> -		    1->Address to be considered for writing the value.
> +		ii) Write instruction
>   
> -		    2->The value that needs to be written at the location.
> +		    ::
>   
> -		    3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb
> -		       but respectively.
> +		      echo W <addr> <n> <bus type> > /sys/kernel/debug/dcc/../[list-number]/config
>   
> -	        iii) Read Modify Write type instruction
> +		    where:
>   
> -		     echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
> +		    <addr>
> +			The address to be written.
>   
> -		     1->The address which needs to be considered for read then write.
> +		    <n>
> +			The value to be written at <addr>.
>   
> -		     2->The value that needs to be written on the address.
> +		    <bus type>
> +			The bus type, which can be either 'apb' or 'ahb'.
>   
> -		     3->The mask of the value to be written.
> +	        iii) Read-write instruction
>   
> -		iv) Loop Type Instruction
> +		     ::
>   
> -		    echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
> +		       echo RW <addr> <n> <mask> > /sys/kernel/debug/dcc/../[list-number]/config
>   
> -		    1->The loop count, the number of times the value of the addresses will be
> -		       captured.
> +		     where:
>   
> -		    2->The address count, total number of addresses to be entered in this
> -		       instruction.
> +		     <addr>
> +			The address to be read and written.
>   
> -		    3->The series of addresses to be entered separated by a space like <addr1>
> -		       <addr2>... and so on.
> +		     <n>
> +		        The value to be written at <addr>.
> +
> +		     <mask>
> +			The value mask.
> +
> +		iv) Loop instruction
> +
> +		    ::
> +
> +		      echo L <loop count> <address count> <address>... > /sys/kernel/debug/dcc/../[list-number]/config
> +
> +		    where:
> +
> +		    <loop count>
> +			Number of iterations
> +
> +		    <address count>
> +			total number of addresses to be written
> +
> +		    <address>
> +			Space-separated list of addresses.
>   
>   What:           /sys/kernel/debug/dcc/.../[list-number]/enable
>   Date:           December 2022
>   Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
>   Description:
>   		This debugfs interface is used for enabling the
> -		the dcc hardware. Enable file is kept under the
> -		directory list number for which the user wants
> -		to enable it. For example if the user wants to
> -		enable list 1, then he should go for
> -		echo 1 > /sys/kernel/debug/dcc/.../1/enable.
> -		On enabling the dcc, all the addresses entered
> +		the dcc hardware. A file named "enable" is in the
> +		directory list number where users can enable/disable
> +		the specific list by writing boolean (1 or 0) to the
> +		file.
> +
> +		On enabling the dcc, all the addresses specified
>   		by the user for the corresponding list is written
>   		into dcc sram which is read by the dcc hardware
> -		on manual or crash induced triggers. Lists should
> -		be enabled sequentially.For example after configuring
> -		addresses for list 1 and enabling it, a user can
> -		proceed to enable list 2 or vice versa.
> -		Example:
> -		echo  0 > /sys/kernel/debug/dcc/.../[list-number]/enable
> -		(disable dcc for the corresponding list number)
> -		echo  1 > /sys/kernel/debug/dcc/.../[list-number]/enable
> -		(enable dcc for the corresponding list number)
> +		on manual or crash induced triggers. Lists must
> +		be configured and enabled sequentially, e.g. list
> +		2 can only be enabled when list 1 have so.

Acked-by:Souradeep Chowdhury <quic_schowdhu@quicinc.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] soc: qcom: dcc: Documentation improv
  2022-12-30 13:50 [PATCH 0/2] soc: qcom: dcc: Documentation improv Bagas Sanjaya
                   ` (2 preceding siblings ...)
  2023-01-05  3:33 ` [PATCH 0/2] soc: qcom: dcc: Documentation improv Bagas Sanjaya
@ 2023-01-07  0:08 ` Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2023-01-07  0:08 UTC (permalink / raw)
  To: linux-doc, devicetree, linux-arm-msm, linux-arm-kernel,
	linux-kernel, bagasdotme
  Cc: robh+dt, quic_rjendra, quic_sibis, krzysztof.kozlowski+dt, elder,
	quic_saipraka, agross, konrad.dybcio, quic_schowdhu, vkoul

On Fri, 30 Dec 2022 20:50:29 +0700, Bagas Sanjaya wrote:
> The DCC (Data Capture and Compare) patchset was sent and partially
> merged [1] without Cc'ing linux-doc list for documentation review.
> kernel test robot [2] noted htmldocs warnings as a result, which is fixed
> in [1/2]. Later, when inspecting the sysfs description, the wording
> could have been improved ([2/2]). So here is the improv series.
> 
> [1]: https://lore.kernel.org/lkml/cover.1672148732.git.quic_schowdhu@quicinc.com/
> [2]: https://lore.kernel.org/linux-doc/202212300426.eMLsZsvA-lkp@intel.com/
> 
> [...]

Applied, thanks!

[1/2] soc: qcom: dcc: Fix examples list on /sys/kernel/debug/dcc/.../[list-number]/config documentation
      commit: dc2f5a499de420001813562ddbc9d51ece295978
[2/2] soc: qcom: dcc: rewrite description of dcc sysfs files
      commit: 13763fb955a0043bd9b6fb1e237f4fd8fe8b3c75

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-07  0:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-30 13:50 [PATCH 0/2] soc: qcom: dcc: Documentation improv Bagas Sanjaya
2022-12-30 13:50 ` [PATCH 1/2] soc: qcom: dcc: Fix examples list on /sys/kernel/debug/dcc/.../[list-number]/config documentation Bagas Sanjaya
2023-01-05  5:04   ` Souradeep Chowdhury
2022-12-30 13:50 ` [PATCH 2/2] soc: qcom: dcc: rewrite description of dcc sysfs files Bagas Sanjaya
2023-01-05  5:17   ` Souradeep Chowdhury
2023-01-05  3:33 ` [PATCH 0/2] soc: qcom: dcc: Documentation improv Bagas Sanjaya
2023-01-07  0:08 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).