diff mbox series

[v7,3/6] Documentation: Add ABI doc for attributes of LJCA device

Message ID 20230325154711.2419569-4-xiang.ye@intel.com (mailing list archive)
State Superseded
Headers show
Series Add Intel LJCA device driver | expand

Commit Message

Ye Xiang March 25, 2023, 3:47 p.m. UTC
Add sysfs attributes Documentation entries for LJCA device

Signed-off-by: Ye Xiang <xiang.ye@intel.com>
---
 .../ABI/testing/sysfs-bus-usb-devices-ljca    | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-usb-devices-ljca

Comments

Oliver Neukum April 4, 2023, 8:53 a.m. UTC | #1
On 25.03.23 16:47, Ye Xiang wrote:
> Add sysfs attributes Documentation entries for LJCA device

Hi,

do we really want each driver to have its own attribute for that?
It seems to me that that should be unified.

	Regards
		Oliver

> +
> +What:		/sys/bus/usb/.../ljca_enable_dfu
> +Date:		July 2023
> +KernelVersion:	6.4
> +Contact:	Ye Xiang<xiang.ye@intel.com>
> +Description:
> +		Writing 1 to this file to force the LJCA device into DFU
> +		mode so the firmware can be updated. After firmware
> +		updating has been done, the device will back to normal
> +		working mode.
Ye Xiang April 10, 2023, 10:44 a.m. UTC | #2
Hi Oliver

Thanks for the review.
On Tue, Apr 04, 2023 at 10:53:48AM +0200, Oliver Neukum wrote:
> 
> 
> On 25.03.23 16:47, Ye Xiang wrote:
> > Add sysfs attributes Documentation entries for LJCA device
> 
> Hi,
> 
> do we really want each driver to have its own attribute for that?
> It seems to me that that should be unified.
Three ABI entries are added in this patch: ljca_version, ljca_trace_level,
and ljca_enable_dfu. The first two items are specified for LJCA device and
I think they can be kept in sysfs-bus-usb-devices-ljca.

But for ljca_enable_dfu, I didn't see a unified DFU entry in sys-bus-usb.
I am not sure whether other USB devices have similar DFU mode or not.

Any suggestions?

Thanks
Ye Xiang
> 
> > +
> > +What:		/sys/bus/usb/.../ljca_enable_dfu
> > +Date:		July 2023
> > +KernelVersion:	6.4
> > +Contact:	Ye Xiang<xiang.ye@intel.com>
> > +Description:
> > +		Writing 1 to this file to force the LJCA device into DFU
> > +		mode so the firmware can be updated. After firmware
> > +		updating has been done, the device will back to normal
> > +		working mode.
Oliver Neukum April 12, 2023, 11:10 a.m. UTC | #3
On 10.04.23 12:44, Ye, Xiang wrote:

Hi,

>> do we really want each driver to have its own attribute for that?
>> It seems to me that that should be unified.
> Three ABI entries are added in this patch: ljca_version, ljca_trace_level,
> and ljca_enable_dfu. The first two items are specified for LJCA device and
> I think they can be kept in sysfs-bus-usb-devices-ljca.
> 
> But for ljca_enable_dfu, I didn't see a unified DFU entry in sys-bus-usb.
> I am not sure whether other USB devices have similar DFU mode or not.
> 
> Any suggestions?

What exactly does this attribute do?
Is it in addition to the normal DFU_DETACH + reset sequence, is it
needed for DFU_DETACH to work, does it enable the
DFU class interface descriptor?

A point of DFU is rather that the capability should be announced
via descriptors. The answer would depend on what exactly this
attribute does.

	Regards
		Oliver
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-bus-usb-devices-ljca b/Documentation/ABI/testing/sysfs-bus-usb-devices-ljca
new file mode 100644
index 000000000000..16eecaf870e2
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-usb-devices-ljca
@@ -0,0 +1,36 @@ 
+What:		/sys/bus/usb/.../ljca_version
+Date:		July 2023
+KernelVersion:	6.4
+Contact:	Ye Xiang <xiang.ye@intel.com>
+Description:
+		Provides the current firmware version of LJCA device.
+		The format is Major.Minor.Patch.Build, where
+		Major, Minor, Patch, and Build are decimal numbers.
+		For example: 1.0.0.256
+
+What:		/sys/bus/usb/.../ljca_enable_dfu
+Date:		July 2023
+KernelVersion:	6.4
+Contact:	Ye Xiang <xiang.ye@intel.com>
+Description:
+		Writing 1 to this file to force the LJCA device into DFU
+		mode so the firmware can be updated. After firmware
+		updating has been done, the device will back to normal
+		working mode.
+
+What:		/sys/bus/usb/.../ljca_trace_level
+Date:		July 2023
+KernelVersion:	6.4
+Contact:	Ye Xiang <xiang.ye@intel.com>
+Description:
+		Writing N to this file to set firmware log level of LJCA
+		device. The log can be printed to another computer through
+		UART ports in LJCA device. Valid values:
+
+		  ==	==========
+		   0	LEVEL_ERROR
+		   1	LEVEL_WARNING
+		   2	LEVEL_INFO
+		   3	LEVEL_DEBUG
+		   4	LEVEL_OFF
+		  ==	==========