summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-01-15 07:21:34 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-01-15 07:21:34 -0800
commit78fd834fc23fb940af38b11a028286b5aa0b0b47 (patch)
tree570e783c575fe18c9404c6e879eacd1e399938aa
parent3cf28edcf2ad87d4d819becbc3b384241fe8ed18 (diff)
parent3c9ffd503c88cf5d70f6c6c7fd58c7caad02b533 (diff)
Merge "Update documentation for uinput command's bus values" into main
-rw-r--r--cmds/uinput/README.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmds/uinput/README.md b/cmds/uinput/README.md
index 6138388b30c7..5734c847be87 100644
--- a/cmds/uinput/README.md
+++ b/cmds/uinput/README.md
@@ -59,7 +59,7 @@ Register a new uinput device
| `name` | string | Device name |
| `vid` | 16-bit integer | Vendor ID |
| `pid` | 16-bit integer | Product ID |
-| `bus` | string | Bus that device should use |
+| `bus` | string | The bus to report |
| `port` | string | `phys` value to report |
| `configuration` | object array | uinput device configuration|
| `ff_effects_max` | integer | `ff_effects_max` value |
@@ -68,8 +68,11 @@ Register a new uinput device
`id` is used for matching the subsequent commands to a specific device to avoid ambiguity when
multiple devices are registered.
-`bus` is used to determine how the uinput device is connected to the host. The options are `"usb"`
-and `"bluetooth"`.
+`bus` specifies the bus that the kernel should report the device as being connected to. The most
+common values are `"usb"` and `"bluetooth"`, but any bus with a `BUS_…` constant in the [Linux
+kernel's input.h][input.h] can be specified using the part of its identifier after `BUS_`. For
+example, to specify the SPI bus type (`BUS_SPI` in the kernel header), use `"spi"` (or `"SPI"`,
+since it's case-insensitive).
Device configuration is used to configure the uinput device. The `type` field provides a `UI_SET_*`
control code as an integer value or a string label (e.g. `"UI_SET_EVBIT"`), and data is a vector of
@@ -137,6 +140,7 @@ Example:
}
```
+[input.h]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/kernel/upstream/include/uapi/linux/input.h?q=BUS_
[struct input_absinfo]: https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/kernel/uapi/linux/input.h?q=%22struct%20input_absinfo%22
##### Waiting for registration