Details
- Reviewers
wulf - Group Reviewers
Contributor Reviews (src) desktop - Commits
- rG176939bd361a: bcm5974: fix wellspring9 pressure settings to handle force sensitivity
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/dev/hid/bcm5974.c | ||
---|---|---|
338 | last member (size) value should be 0 for pressure. To adjust max member you may use compatibility events. When I slide index finger over Synaptics touchpad surface it reports ABS_PRESSURE varying between 80 and 90. I think Apple device should behave similarly. Also keep in mind that out-of-bounds values are generally allowed in evdev |
sys/dev/hid/bcm5974.c | ||
---|---|---|
338 | size being zero is the problem. wellspring9 does not behave similarly, it is a real pressure sensitive touchpad, where pressure is actual physical force instead of a contact size based approximation. And non-zero resolution is how this is indicated in evdev:
|
LGTM. But I would prefer to perform some measurements to properly scale pressure value. Or just drop it.
As mentioned in the comment, around 3500 is what I measured for a really hard press, so I rounded up to the next power of two, that's why it's 4096.
I am talking about obeying of this rule[1]:
If the resolution is zero, the pressure data is in arbitrary units. If the resolution is non-zero, the pressure data is in units/gram. For example, a value of 10 with a resolution of 1 represents 10 gram, a value of 10 with a resolution of 1000 represents 10 microgram.
Just put some real known weight on touchpad surface to calculate real-weight to reported-pressure ratio and than apply it to input report handler. In that case .p = f->pressure, will change to .p = f->pressure * W2P_RATE,. Probably, we should use resolution higher than 1