iichid(4): Restore/increase sampling rate

My previous commit by reducing precision reduced the sampling rate
from 60Hz to 40Hz on idle system.  Return it back to 60-80Hz range,
that should be good for mouse smoothness on 60Hz displays.

MFC after:	1 months
This commit is contained in:
Alexander Motin 2023-12-23 19:10:49 -05:00
parent 9c9d7fdd9f
commit 68e457df02

View file

@ -106,9 +106,9 @@ enum {
* sampling_rate_fast value too high as it may result in periodical lags of
* cursor motion.
*/
#define IICHID_SAMPLING_RATE_FAST 60
#define IICHID_SAMPLING_RATE_FAST 80
#define IICHID_SAMPLING_RATE_SLOW 10
#define IICHID_SAMPLING_HYSTERESIS 12 /* ~ 2x fast / slow */
#define IICHID_SAMPLING_HYSTERESIS 16 /* ~ 2x fast / slow */
/* 5.1.1 - HID Descriptor Format */
struct i2c_hid_desc {
@ -567,7 +567,7 @@ iichid_event_task(void *context, int pending)
else
rate = sc->sampling_rate_fast;
taskqueue_enqueue_timeout_sbt(sc->taskqueue, &sc->periodic_task,
SBT_1S / MAX(rate, 1), 0, C_PREL(1));
SBT_1S / MAX(rate, 1), 0, C_PREL(2));
}
out:
if (bus_requested)