Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: HID: hid-sensor editing & corrections

Do basic editing & correction to hid-sensor.rst:
- use HID consistently instead of hid
- drop a duplicate word
- change article adjective an -> a
- fix grammar & punctuation
- spell out RW -> read-write
- hyphenate multi-word adjectives

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: linux-input@vger.kernel.org
Cc: linux-iio@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Randy Dunlap and committed by
Jiri Kosina
ce6bf2d9 1c900363

+9 -9
+9 -9
Documentation/hid/hid-sensor.rst
··· 48 48 an ambient light sensor can send illumination data. 49 49 So the implementation has two parts: 50 50 51 - - Core hid driver 51 + - Core HID driver 52 52 - Individual sensor processing part (sensor drivers) 53 53 54 54 Core driver 55 55 ----------- 56 - The core driver registers (hid-sensor-hub) registers as a HID driver. It parses 56 + The core driver (hid-sensor-hub) registers as a HID driver. It parses 57 57 report descriptors and identifies all the sensors present. It adds an MFD device 58 58 with name HID-SENSOR-xxxx (where xxxx is usage id from the specification). 59 59 ··· 95 95 u32 usage_id, 96 96 struct hid_sensor_hub_callbacks *usage_callback): 97 97 98 - Registers callbacks for an usage id. The callback functions are not allowed 98 + Registers callbacks for a usage id. The callback functions are not allowed 99 99 to sleep:: 100 100 101 101 102 102 int sensor_hub_remove_callback(struct hid_sensor_hub_device *hsdev, 103 103 u32 usage_id): 104 104 105 - Removes callbacks for an usage id. 105 + Removes callbacks for a usage id. 106 106 107 107 108 108 Parsing function:: ··· 166 166 Some common use cases are debug other sensors or to provide some events like 167 167 keyboard attached/detached or lid open/close. 168 168 169 - To allow application to utilize these sensors, here they are exported uses sysfs 169 + To allow application to utilize these sensors, here they are exported using sysfs 170 170 attribute groups, attributes and misc device interface. 171 171 172 172 An example of this representation on sysfs:: ··· 207 207 │   │   │   ├── input-1-200202-units 208 208 │   │   │   ├── input-1-200202-value 209 209 210 - Here there is a custom sensors with four fields, two feature and two inputs. 210 + Here there is a custom sensor with four fields: two feature and two inputs. 211 211 Each field is represented by a set of attributes. All fields except the "value" 212 - are read only. The value field is a RW field. 212 + are read only. The value field is a read-write field. 213 213 214 214 Example:: 215 215 ··· 237 237 │   │   │   ├── 10:53 -> ../HID-SENSOR-2000e1.6.auto 238 238 │   ├── HID-SENSOR-2000e1.6.auto 239 239 240 - Each reports can be of variable length preceded by a header. This header 241 - consist of a 32 bit usage id, 64 bit time stamp and 32 bit length field of raw 240 + Each report can be of variable length preceded by a header. This header 241 + consists of a 32-bit usage id, 64-bit time stamp and 32-bit length field of raw 242 242 data.