| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Errors will result in nice clean panic messages so we know what's wrong.
Reviewed by dhill visa natano jsg.
|
| |
|
|
|
|
|
|
|
|
|
| |
These files aren't USB-specific and were used by the previous
Bluetooth implementation, and will be used by the upcoming
HID-over-i2C implementation
ok deraadt
previous version ok kettenis and mpi
|
|
|
|
|
|
| |
sleep.
Discussed with deraadt@
|
| |
|
|
|
|
|
|
| |
sensors only if it is present, From David Higgs.
Fix a regression reported by and ok halex@
|
|
|
|
| |
From David Higgs.
|
|
|
|
|
|
|
|
|
|
| |
Since HID buffers always start by a reportID we can access the corresponding
report descriptor in O(1). Having a list of sensors attached to each report
descriptor makes it easier to update all of them with only on I/O request.
Note that sensors are attached in depency order on every report list.
From David Higgs.
|
|
|
|
|
|
|
|
|
|
| |
children of a sensor in a separate structure.
Children sensors should only be probbed if their parent is active.
This make the dependency tree explicit and will reduce the number
of I/O.
From David Higgs.
|
|
|
|
|
|
|
|
|
|
| |
parse the HID descriptor multiple times to find them.
This logic is necessary to later create a tree of sensors in order to
avoid lookups in the hot path for sensors that depend on the value of
others.
From David Higgs.
|
|
|
|
| |
From David Higgs.
|
| |
|
| |
|
|
|
|
| |
and use this idiom everywhere, it is always safest.
|
|
|
|
|
|
|
|
| |
As reported by David Higgs some UPSes might send fewer bytes than
requested. When such thing happens, do like apcupsd and adjust
the size of the given descriptor.
Based on a diff provided by David Higgs, thanks!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Always pass the parent uhidev(4) descriptor corresponding to the single
USB device with multiple reportIDs instead of a child.
Make uhidev_get_report() aware of non NUL reportID by prepending a byte
to the given buffer, just like uhidev_set_report{,async}() already do.
Return the number of bytes written or read upon success and -1 otherwise.
This allow callers to deal with short reads without having do mess with
xfer error codes madness.
Reviewed and tested by David Higgs.
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
|
| |
input device descriptors, notably if they include an Item with an
Usage array (Min-Max range) and others single Usage elements.
Tested by many, thanks! ok andre@
|
|
|
|
|
|
| |
versus supported sensors table filtering.
discussed with and ok mpi@
|
|
|
|
|
|
|
|
| |
instead of using the default, per-driver, one. This is a step to move
away from the 1 report ID <-> 1 driver design which is no longer true
since the addition of upd(4).
ok andre@
|
|
|
|
|
|
|
|
|
|
|
| |
- Allocate/enable sensors wich match both: the static usage table of supported
usage IDs and the usages supported by the device;
- Do not attach when no sensors can be allocated;
- Makes device querying smarter: query the device just once for values stored
in the same reportid reply payload.
- Use sensor_status.
ok mpi@
|
|
|
|
|
|
|
|
| |
UPSes.
(forced commit due to previous empty commit message)
ok mpi@ sthen@
|
| |
|
|
|
|
|
| |
suggested by deraadt@
ok mpi@
|
| |
|
|
At this moment upd(4) exposes data from usb-based uninterruptable power systems
(or just USB Power Devices), sysctl(8) sensors (read snmpd(8) friendly), it is
also an "in-base" alternative to other 3rdparty UPS-monitoring software, we
have plans to bring more features.
This is my first "something" into the tree. Lots of thanks:
sthen@ and blambert@ are the ones to blame for the idea/challenge.
mpi@ is the one whom pushed me to get it correct (from uhub -> uhidev).
reyk@ mentored me on OpenBSD-way with previous iked/relayd experiences.
ok mpi@, deraadt@ "get it in".
|