diff options
author | 2024-02-05 18:22:28 +0800 | |
---|---|---|
committer | 2024-02-09 12:07:48 +0000 | |
commit | 409c38d4f156740bf3165fd6ceae4fa6425eebf4 (patch) | |
tree | da0b2c9eb3f03056b505c32561657bb4b8a452e2 /Documentation | |
parent | wwan: core: Add WWAN fastboot port type (diff) | |
download | linux-409c38d4f156740bf3165fd6ceae4fa6425eebf4.tar.gz linux-409c38d4f156740bf3165fd6ceae4fa6425eebf4.tar.bz2 linux-409c38d4f156740bf3165fd6ceae4fa6425eebf4.zip |
net: wwan: t7xx: Add sysfs attribute for device state machine
Add support for userspace to get/set the device mode, device's state
machine changes between (unknown/ready/reset/fastboot).
Get the device state mode:
- 'cat /sys/bus/pci/devices/${bdf}/t7xx_mode'
Set the device state mode:
- reset(cold reset): 'echo reset > /sys/bus/pci/devices/${bdf}/t7xx_mode'
- fastboot: 'echo fastboot_switching > /sys/bus/pci/devices/${bdf}/t7xx_mode'
Reload driver to get the new device state after setting operation.
Signed-off-by: Jinjian Song <jinjian.song@fibocom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/networking/device_drivers/wwan/t7xx.rst | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Documentation/networking/device_drivers/wwan/t7xx.rst b/Documentation/networking/device_drivers/wwan/t7xx.rst index dd5b731957ca..8429b9927341 100644 --- a/Documentation/networking/device_drivers/wwan/t7xx.rst +++ b/Documentation/networking/device_drivers/wwan/t7xx.rst @@ -39,6 +39,34 @@ command and receive response: - open the AT control channel using a UART tool or a special user tool +Sysfs +===== +The driver provides sysfs interfaces to userspace. + +t7xx_mode +--------- +The sysfs interface provides userspace with access to the device mode, this interface +supports read and write operations. + +Device mode: + +- ``unknown`` represents that device in unknown status +- ``ready`` represents that device in ready status +- ``reset`` represents that device in reset status +- ``fastboot_switching`` represents that device in fastboot switching status +- ``fastboot_download`` represents that device in fastboot download status +- ``fastboot_dump`` represents that device in fastboot dump status + +Read from userspace to get the current device mode. + +:: + $ cat /sys/bus/pci/devices/${bdf}/t7xx_mode + +Write from userspace to set the device mode. + +:: + $ echo fastboot_switching > /sys/bus/pci/devices/${bdf}/t7xx_mode + Management application development ================================== The driver and userspace interfaces are described below. The MBIM protocol is |