Commit 87131072 authored by Tomasz Pakuła's avatar Tomasz Pakuła Committed by Jiri Kosina
Browse files

HID: pidff: Rescale time values to match field units



PID devices can use different exponents for time fields, while Linux
Force Feedback API only supports miliseconds.

Read the exponent of a given time field and scale its value accordingly.

Changes in v7:
- Rescale all time fields, not only period

changes in v9:
- Properly assign fade_lenght, not attack_length to PID_FADE_TIME

Co-developed-by: default avatarMakarenko Oleg <oleg@makarenk.ooo>
Signed-off-by: default avatarMakarenko Oleg <oleg@makarenk.ooo>
Signed-off-by: default avatarTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Reviewed-by: default avatarMichał Kopeć <michal@nozomi.space>
Reviewed-by: default avatarPaul Dino Jones <paul@spacefreak18.xyz>
Tested-by: default avatarPaul Dino Jones <paul@spacefreak18.xyz>
Tested-by: default avatarCristóferson Bueno <cbueno81@gmail.com>
Tested-by: default avatarPablo Cisneros <patchkez@protonmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 1c12f136
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment