[PATCH v6 11/11] scsi: ufs: sysfs: attributes

2018-02-15 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS attributes. The
group adds "attributes" folder under the UFS driver sysfs entry
(/sys/bus/platform/drivers/ufshcd/*). The attributes are shown
as hexadecimal numbers. The full information about the attributes could
be found at UFS specifications 2.1.

Signed-off-by: Stanislav Nijnikov 
Reviewed-by: Greg Kroah-Hartman 
---
 Documentation/ABI/testing/sysfs-driver-ufs | 139 +
 drivers/scsi/ufs/ufs-sysfs.c   |  80 +
 drivers/scsi/ufs/ufs-sysfs.h   |   1 +
 drivers/scsi/ufs/ufs.h |  27 +-
 drivers/scsi/ufs/ufshcd.c  |   5 +-
 drivers/scsi/ufs/ufshcd.h  |   3 +-
 6 files changed, 248 insertions(+), 7 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-driver-ufs 
b/Documentation/ABI/testing/sysfs-driver-ufs
index f4f49e2..07f1c2f 100644
--- a/Documentation/ABI/testing/sysfs-driver-ufs
+++ b/Documentation/ABI/testing/sysfs-driver-ufs
@@ -663,3 +663,142 @@ Description:  This file shows whether the device FW 
update is permanently
disabled. The full information about the flag could be found
at UFS specifications 2.1.
The file is read only.
+
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/boot_lun_enabled
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the boot lun enabled UFS device attribute.
+   The full information about the attribute could be found at
+   UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/current_power_mode
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the current power mode UFS device attribute.
+   The full information about the attribute could be found at
+   UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/active_icc_level
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the active icc level UFS device attribute.
+   The full information about the attribute could be found at
+   UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/ooo_data_enabled
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the out of order data transfer enabled UFS
+   device attribute. The full information about the attribute
+   could be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/bkops_status
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the background operations status UFS device
+   attribute. The full information about the attribute could
+   be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/purge_status
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the purge operation status UFS device
+   attribute. The full information about the attribute could
+   be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_in_size
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file shows the maximum data size in a DATA IN
+   UPIU. The full information about the attribute could
+   be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_out_size
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file shows the maximum number of bytes that can be
+   requested with a READY TO TRANSFER UPIU. The full information
+   about the attribute could be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  
/sys/bus/platform/drivers/ufshcd/*/attributes/reference_clock_frequency
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the reference clock frequency UFS device
+   attribute. The full information about the attribute could
+  

[PATCH v6 11/11] scsi: ufs: sysfs: attributes

2018-02-15 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS attributes. The
group adds "attributes" folder under the UFS driver sysfs entry
(/sys/bus/platform/drivers/ufshcd/*). The attributes are shown
as hexadecimal numbers. The full information about the attributes could
be found at UFS specifications 2.1.

Signed-off-by: Stanislav Nijnikov 
Reviewed-by: Greg Kroah-Hartman 
---
 Documentation/ABI/testing/sysfs-driver-ufs | 139 +
 drivers/scsi/ufs/ufs-sysfs.c   |  80 +
 drivers/scsi/ufs/ufs-sysfs.h   |   1 +
 drivers/scsi/ufs/ufs.h |  27 +-
 drivers/scsi/ufs/ufshcd.c  |   5 +-
 drivers/scsi/ufs/ufshcd.h  |   3 +-
 6 files changed, 248 insertions(+), 7 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-driver-ufs 
b/Documentation/ABI/testing/sysfs-driver-ufs
index f4f49e2..07f1c2f 100644
--- a/Documentation/ABI/testing/sysfs-driver-ufs
+++ b/Documentation/ABI/testing/sysfs-driver-ufs
@@ -663,3 +663,142 @@ Description:  This file shows whether the device FW 
update is permanently
disabled. The full information about the flag could be found
at UFS specifications 2.1.
The file is read only.
+
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/boot_lun_enabled
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the boot lun enabled UFS device attribute.
+   The full information about the attribute could be found at
+   UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/current_power_mode
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the current power mode UFS device attribute.
+   The full information about the attribute could be found at
+   UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/active_icc_level
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the active icc level UFS device attribute.
+   The full information about the attribute could be found at
+   UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/ooo_data_enabled
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the out of order data transfer enabled UFS
+   device attribute. The full information about the attribute
+   could be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/bkops_status
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the background operations status UFS device
+   attribute. The full information about the attribute could
+   be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/purge_status
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the purge operation status UFS device
+   attribute. The full information about the attribute could
+   be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_in_size
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file shows the maximum data size in a DATA IN
+   UPIU. The full information about the attribute could
+   be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_out_size
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file shows the maximum number of bytes that can be
+   requested with a READY TO TRANSFER UPIU. The full information
+   about the attribute could be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  
/sys/bus/platform/drivers/ufshcd/*/attributes/reference_clock_frequency
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file provides the reference clock frequency UFS device
+   attribute. The full information about the attribute could
+   be found at UFS specifications 2.1.
+   The file is read only.
+
+What:  
/sys/bus/platform/drivers/ufshcd/*/attributes/configuration_descriptor_lock
+Date:  February 2018
+Contact:   Stanislav Nijnikov 
+Description:   This file shows whether the configuration