Page MenuHomeFreeBSD

bcm5974: fix wellspring9 pressure settings to handle force sensitivity

Authored by on Mar 3 2022, 11:20 PM.

Diff Detail

rS FreeBSD src repository - subversion
Lint Passed
No Test Coverage
Build Status
Buildable 44642
Build 41530: arc lint + arc unit

Event Timeline


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


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:

The kernel/udev set the pressure resolution to nonzero to indicate the value is in a known scale (units/g).

LGTM. But I would prefer to perform some measurements to properly scale pressure value. Or just drop it.

This revision is now accepted and ready to land.Mar 4 2022, 10:07 PM

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