mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
Some devices (mainly Asetek) do not have deadband field in set conditional usage. Do not fail set conditional usage search if it's missing. Allows conditional effect playback on Asetek wheelbases. Deadband is practically never used in simracing anyway. Align property name in the whole driver to use 'deadband' without space. Co-developed-by: Oleg Makarenko <oleg@makarenk.ooo> Signed-off-by: Oleg Makarenko <oleg@makarenk.ooo> Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef __HID_PIDFF_H
|
|
#define __HID_PIDFF_H
|
|
|
|
#include <linux/hid.h>
|
|
|
|
/* HID PIDFF quirks */
|
|
|
|
/* Delay field (0xA7) missing. Skip it during set effect report upload */
|
|
#define HID_PIDFF_QUIRK_MISSING_DELAY BIT(0)
|
|
|
|
/* Missing Paramter block offset (0x23). Skip it during SET_CONDITION upload */
|
|
#define HID_PIDFF_QUIRK_MISSING_PBO BIT(1)
|
|
|
|
/* Initialise device control field even if logical_minimum != 1 */
|
|
#define HID_PIDFF_QUIRK_PERMISSIVE_CONTROL BIT(2)
|
|
|
|
/* Use fixed 0x4000 direction during SET_EFFECT report upload */
|
|
#define HID_PIDFF_QUIRK_FIX_CONDITIONAL_DIRECTION BIT(3)
|
|
|
|
/* Force all periodic effects to be uploaded as SINE */
|
|
#define HID_PIDFF_QUIRK_PERIODIC_SINE_ONLY BIT(4)
|
|
|
|
/* Allow devices with missing negative coefficient in the set condition usage */
|
|
#define HID_PIDFF_QUIRK_MISSING_NEG_COEFFICIENT BIT(5)
|
|
|
|
/* Allow devices with missing negative saturation in the set condition usage */
|
|
#define HID_PIDFF_QUIRK_MISSING_NEG_SATURATION BIT(6)
|
|
|
|
/* Allow devices with missing deadband in the set condition usage */
|
|
#define HID_PIDFF_QUIRK_MISSING_DEADBAND BIT(7)
|
|
|
|
#ifdef CONFIG_HID_PID
|
|
int hid_pidff_init(struct hid_device *hid);
|
|
int hid_pidff_init_with_quirks(struct hid_device *hid, u32 initial_quirks);
|
|
#else
|
|
#define hid_pidff_init NULL
|
|
#define hid_pidff_init_with_quirks NULL
|
|
#endif
|
|
|
|
#endif
|