Lines Matching +full:ssc +full:- +full:on

1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Fixes the HID report descriptor by removing a non-existent axis and
7 * clearing the constant bit on the input reports for buttons and d-pad.
8 * (This module is based on "hid-ortek".)
25 #include "hid-ids.h"
39 unsigned long quirks = id->driver_data; in saitek_probe()
40 struct saitek_sc *ssc; in saitek_probe() local
43 ssc = devm_kzalloc(&hdev->dev, sizeof(*ssc), GFP_KERNEL); in saitek_probe()
44 if (ssc == NULL) { in saitek_probe()
46 return -ENOMEM; in saitek_probe()
49 ssc->quirks = quirks; in saitek_probe()
50 ssc->mode = -1; in saitek_probe()
52 hid_set_drvdata(hdev, ssc); in saitek_probe()
72 struct saitek_sc *ssc = hid_get_drvdata(hdev); in saitek_report_fixup() local
74 if ((ssc->quirks & SAITEK_FIX_PS1000) && *rsize == 137 && in saitek_report_fixup()
85 /* clear constant bit on buttons and d-pad */ in saitek_report_fixup()
96 struct saitek_sc *ssc = hid_get_drvdata(hdev); in saitek_raw_event() local
98 if (ssc->quirks & SAITEK_RELEASE_MODE_RAT7 && size == 7) { in saitek_raw_event()
100 int mode = -1; in saitek_raw_event()
111 if (mode != ssc->mode) { in saitek_raw_event()
113 if (ssc->mode != -1) { in saitek_raw_event()
117 ssc->mode = mode; in saitek_raw_event()
119 } else if (ssc->quirks & SAITEK_RELEASE_MODE_MMO7 && size == 8) { in saitek_raw_event()
122 int mode = -1; in saitek_raw_event()
134 if (mode != ssc->mode) { in saitek_raw_event()
136 if (ssc->mode != -1) { in saitek_raw_event()
143 ssc->mode = mode; in saitek_raw_event()
153 struct saitek_sc *ssc = hid_get_drvdata(hdev); in saitek_event() local
154 struct input_dev *input = field->hidinput->input; in saitek_event()
156 if (usage->type == EV_KEY && value && in saitek_event()
157 (((ssc->quirks & SAITEK_RELEASE_MODE_RAT7) && in saitek_event()
158 usage->code - BTN_MOUSE == 10) || in saitek_event()
159 ((ssc->quirks & SAITEK_RELEASE_MODE_MMO7) && in saitek_event()
160 usage->code - BTN_MOUSE == 15))) { in saitek_event()
162 input_report_key(input, usage->code, 1); in saitek_event()
165 input_report_key(input, usage->code, 0); in saitek_event()