diff mbox series

[6/6] scsi: ufs: ufs-sysfs: Introduce UFS power info sysfs nodes

Message ID 1694411968-14413-7-git-send-email-quic_cang@quicinc.com
State New
Headers show
Series Enable HS-G5 support on SM8550 | expand

Commit Message

Can Guo Sept. 11, 2023, 5:59 a.m. UTC
Having UFS power info available in sysfs makes it easier to tell the state
of the link during runtime considering we have a bounch of power saving
features and various combinations for backward compatiblity.

Signed-off-by: Can Guo <quic_cang@quicinc.com>
---
 Documentation/ABI/testing/sysfs-driver-ufs | 48 ++++++++++++++++++++++++++----
 1 file changed, 43 insertions(+), 5 deletions(-)

Comments

Nitin Rawat Sept. 14, 2023, 11:35 a.m. UTC | #1
On 9/11/2023 11:29 AM, Can Guo wrote:
> Having UFS power info available in sysfs makes it easier to tell the state
> of the link during runtime considering we have a bounch of power saving
> features and various combinations for backward compatiblity.

Please fix spelling mistake *bounch -> bunch
> 
> Signed-off-by: Can Guo <quic_cang@quicinc.com>
> ---
>   Documentation/ABI/testing/sysfs-driver-ufs | 48 ++++++++++++++++++++++++++----
>   1 file changed, 43 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/ABI/testing/sysfs-driver-ufs b/Documentation/ABI/testing/sysfs-driver-ufs
> index 0c7efaf..25169f2 100644
> --- a/Documentation/ABI/testing/sysfs-driver-ufs
> +++ b/Documentation/ABI/testing/sysfs-driver-ufs
> @@ -1214,12 +1214,50 @@ Description:	This file shows the average latency (in micro seconds) of write
>   
>   		The file is read only.
>   
> -What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_sum
> -What:		/sys/bus/platform/devices/*.ufs/monitor/write_req_latency_sum
> -Date:		January 2021
> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/gear
> +What:		/sys/bus/platform/devices/*.ufs/power_info/gear
> +Date:		September 2023
>   Contact:	Can Guo <quic_cang@quicinc.com>
> -Description:	This file shows the total latency (in micro seconds) of write
> -		requests after monitor gets started.
> +Description:	This file shows the gear of UFS link.
> +
> +		The file is read only.
> +
> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/lane
> +What:		/sys/bus/platform/devices/*.ufs/power_info/lane
> +Date:		September 2023
> +Contact:	Can Guo <quic_cang@quicinc.com>
> +Description:	This file shows how many lanes are enabled on the UFS link.
> +
> +		The file is read only.
> +
> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/mode
> +What:		/sys/bus/platform/devices/*.ufs/power_info/mode
> +Date:		September 2023
> +Contact:	Can Guo <quic_cang@quicinc.com>
> +Description:	This file shows the power mode of UFS link.
> +
> +		The file is read only.
> +
> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/rate
> +What:		/sys/bus/platform/devices/*.ufs/power_info/rate
> +Date:		September 2023
> +Contact:	Can Guo <quic_cang@quicinc.com>
> +Description:	This file shows the high speed rate of UFS link.
> +
> +		The file is read only.
> +
> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/dev_pm
> +What:		/sys/bus/platform/devices/*.ufs/power_info/dev_pm
> +Date:		September 2023
> +Contact:	Can Guo <quic_cang@quicinc.com>
> +Description:	This file shows the UFS device power mode, i.e., the power mode
> +		set to UFS device via the Start Stop Unit command.
> +
> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/link_state
> +What:		/sys/bus/platform/devices/*.ufs/power_info/link_state
> +Date:		September 2023
> +Contact:	Can Guo <quic_cang@quicinc.com>
> +Description:	This file shows the the state of the UFS link.
>   
>   		The file is read only.
>   

Thanks,
nitin
Can Guo Sept. 15, 2023, 2 a.m. UTC | #2
Hi Nitin,

On 9/14/2023 7:35 PM, Nitin Rawat wrote:
>
>
> On 9/11/2023 11:29 AM, Can Guo wrote:
>> Having UFS power info available in sysfs makes it easier to tell the 
>> state
>> of the link during runtime considering we have a bounch of power saving
>> features and various combinations for backward compatiblity.
>
> Please fix spelling mistake *bounch -> bunch

done


Thanks,

Can Guo
Bart Van Assche Sept. 18, 2023, 3:36 p.m. UTC | #3
On 9/10/23 22:59, Can Guo wrote:
> Having UFS power info available in sysfs makes it easier to tell the state
> of the link during runtime considering we have a bounch of power saving
> features and various combinations for backward compatiblity.

bounch -> bunch
compatiblity -> compatibility

Additionally, please combine this patch with patch 5/6 into a single patch.

> -What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_sum
> -What:		/sys/bus/platform/devices/*.ufs/monitor/write_req_latency_sum
> -Date:		January 2021

Has the above information perhaps been removed by accident?

> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/gear
> +What:		/sys/bus/platform/devices/*.ufs/power_info/gear
> +Date:		September 2023
>   Contact:	Can Guo <quic_cang@quicinc.com>
> -Description:	This file shows the total latency (in micro seconds) of write
> -		requests after monitor gets started.
> +Description:	This file shows the gear of UFS link.
> +
> +		The file is read only.

Please explain what "gear" means and also what the unit is of the 
numbers reported via this sysfs attribute.

> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/mode
> +What:		/sys/bus/platform/devices/*.ufs/power_info/mode
> +Date:		September 2023
> +Contact:	Can Guo <quic_cang@quicinc.com>
> +Description:	This file shows the power mode of UFS link.
> +
> +		The file is read only.

Please document the meaning of the numbers reported via this sysfs 
attribute.

> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/rate
> +What:		/sys/bus/platform/devices/*.ufs/power_info/rate
> +Date:		September 2023
> +Contact:	Can Guo <quic_cang@quicinc.com>
> +Description:	This file shows the high speed rate of UFS link.
> +
> +		The file is read only.

Please document the unit of the numbers reported via this sysfs attribute.

> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/dev_pm
> +What:		/sys/bus/platform/devices/*.ufs/power_info/dev_pm
> +Date:		September 2023
> +Contact:	Can Guo <quic_cang@quicinc.com>
> +Description:	This file shows the UFS device power mode, i.e., the power mode
> +		set to UFS device via the Start Stop Unit command.

Please document the meaning of the numbers reported through this sysfs 
attribute.

> +What:		/sys/bus/platform/drivers/ufshcd/*/power_info/link_state
> +What:		/sys/bus/platform/devices/*.ufs/power_info/link_state
> +Date:		September 2023
> +Contact:	Can Guo <quic_cang@quicinc.com>
> +Description:	This file shows the the state of the UFS link.

Please document the meaning of the numbers reported through this sysfs 
attribute.

Thanks,

Bart.
Can Guo Oct. 31, 2023, 4:53 a.m. UTC | #4
Hi Bart,

On 9/18/2023 11:36 PM, Bart Van Assche wrote:
> On 9/10/23 22:59, Can Guo wrote:
>> Having UFS power info available in sysfs makes it easier to tell the 
>> state
>> of the link during runtime considering we have a bounch of power saving
>> features and various combinations for backward compatiblity.
>
> bounch -> bunch
> compatiblity -> compatibility
>
> Additionally, please combine this patch with patch 5/6 into a single 
> patch.

Sure

>
>> -What: /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_sum
>> -What: /sys/bus/platform/devices/*.ufs/monitor/write_req_latency_sum
>> -Date:        January 2021
>
> Has the above information perhaps been removed by accident?
Yes, my bad, good catch.
>
>> +What: /sys/bus/platform/drivers/ufshcd/*/power_info/gear
>> +What:        /sys/bus/platform/devices/*.ufs/power_info/gear
>> +Date:        September 2023
>>   Contact:    Can Guo <quic_cang@quicinc.com>
>> -Description:    This file shows the total latency (in micro seconds) 
>> of write
>> -        requests after monitor gets started.
>> +Description:    This file shows the gear of UFS link.
>> +
>> +        The file is read only.
>
> Please explain what "gear" means and also what the unit is of the 
> numbers reported via this sysfs attribute.
Sure
>
>> +What: /sys/bus/platform/drivers/ufshcd/*/power_info/mode
>> +What:        /sys/bus/platform/devices/*.ufs/power_info/mode
>> +Date:        September 2023
>> +Contact:    Can Guo <quic_cang@quicinc.com>
>> +Description:    This file shows the power mode of UFS link.
>> +
>> +        The file is read only.
>
> Please document the meaning of the numbers reported via this sysfs 
> attribute.
Sure
>
>> +What: /sys/bus/platform/drivers/ufshcd/*/power_info/rate
>> +What:        /sys/bus/platform/devices/*.ufs/power_info/rate
>> +Date:        September 2023
>> +Contact:    Can Guo <quic_cang@quicinc.com>
>> +Description:    This file shows the high speed rate of UFS link.
>> +
>> +        The file is read only.
>
> Please document the unit of the numbers reported via this sysfs 
> attribute.
Sure
>
>> +What: /sys/bus/platform/drivers/ufshcd/*/power_info/dev_pm
>> +What:        /sys/bus/platform/devices/*.ufs/power_info/dev_pm
>> +Date:        September 2023
>> +Contact:    Can Guo <quic_cang@quicinc.com>
>> +Description:    This file shows the UFS device power mode, i.e., the 
>> power mode
>> +        set to UFS device via the Start Stop Unit command.
>
> Please document the meaning of the numbers reported through this sysfs 
> attribute.
Sure
>
>> +What: /sys/bus/platform/drivers/ufshcd/*/power_info/link_state
>> +What: /sys/bus/platform/devices/*.ufs/power_info/link_state
>> +Date:        September 2023
>> +Contact:    Can Guo <quic_cang@quicinc.com>
>> +Description:    This file shows the the state of the UFS link.
>
> Please document the meaning of the numbers reported through this sysfs 
> attribute.

Sure


Thanks,

Can Guo.

>
> Thanks,
>
> Bart.
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-driver-ufs b/Documentation/ABI/testing/sysfs-driver-ufs
index 0c7efaf..25169f2 100644
--- a/Documentation/ABI/testing/sysfs-driver-ufs
+++ b/Documentation/ABI/testing/sysfs-driver-ufs
@@ -1214,12 +1214,50 @@  Description:	This file shows the average latency (in micro seconds) of write
 
 		The file is read only.
 
-What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_sum
-What:		/sys/bus/platform/devices/*.ufs/monitor/write_req_latency_sum
-Date:		January 2021
+What:		/sys/bus/platform/drivers/ufshcd/*/power_info/gear
+What:		/sys/bus/platform/devices/*.ufs/power_info/gear
+Date:		September 2023
 Contact:	Can Guo <quic_cang@quicinc.com>
-Description:	This file shows the total latency (in micro seconds) of write
-		requests after monitor gets started.
+Description:	This file shows the gear of UFS link.
+
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/power_info/lane
+What:		/sys/bus/platform/devices/*.ufs/power_info/lane
+Date:		September 2023
+Contact:	Can Guo <quic_cang@quicinc.com>
+Description:	This file shows how many lanes are enabled on the UFS link.
+
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/power_info/mode
+What:		/sys/bus/platform/devices/*.ufs/power_info/mode
+Date:		September 2023
+Contact:	Can Guo <quic_cang@quicinc.com>
+Description:	This file shows the power mode of UFS link.
+
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/power_info/rate
+What:		/sys/bus/platform/devices/*.ufs/power_info/rate
+Date:		September 2023
+Contact:	Can Guo <quic_cang@quicinc.com>
+Description:	This file shows the high speed rate of UFS link.
+
+		The file is read only.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/power_info/dev_pm
+What:		/sys/bus/platform/devices/*.ufs/power_info/dev_pm
+Date:		September 2023
+Contact:	Can Guo <quic_cang@quicinc.com>
+Description:	This file shows the UFS device power mode, i.e., the power mode
+		set to UFS device via the Start Stop Unit command.
+
+What:		/sys/bus/platform/drivers/ufshcd/*/power_info/link_state
+What:		/sys/bus/platform/devices/*.ufs/power_info/link_state
+Date:		September 2023
+Contact:	Can Guo <quic_cang@quicinc.com>
+Description:	This file shows the the state of the UFS link.
 
 		The file is read only.