Lines Matching +full:1 +full:ms
23 #define MS_ERGONOMY BIT(1)
42 #define ENABLE_STRONG BIT(1)
62 struct ms_data *ms = hid_get_drvdata(hdev); in ms_report_fixup() local
63 unsigned long quirks = ms->quirks; in ms_report_fixup()
89 * the MS office kb labelled "Office Home" and "Task Pane". in ms_ergonomy_kb_quirk()
93 return 1; in ms_ergonomy_kb_quirk()
96 return 1; in ms_ergonomy_kb_quirk()
121 * (this usage is found on interface 1). in ms_ergonomy_kb_quirk()
126 return -1; in ms_ergonomy_kb_quirk()
139 return 1; in ms_ergonomy_kb_quirk()
158 return 1; in ms_presenter_8k_quirk()
168 return -1; in ms_surface_dial_quirk()
175 return -1; in ms_surface_dial_quirk()
186 struct ms_data *ms = hid_get_drvdata(hdev); in ms_input_mapping() local
187 unsigned long quirks = ms->quirks; in ms_input_mapping()
197 return 1; in ms_input_mapping()
213 struct ms_data *ms = hid_get_drvdata(hdev); in ms_input_mapped() local
214 unsigned long quirks = ms->quirks; in ms_input_mapped()
225 struct ms_data *ms = hid_get_drvdata(hdev); in ms_event() local
226 unsigned long quirks = ms->quirks; in ms_event()
235 /* Handling MS keyboards special buttons */ in ms_event()
241 return 1; in ms_event()
246 int step = ((value & 0x60) >> 5) + 1; in ms_event()
256 return 1; in ms_event()
270 input_event(input, usage->type, key, 1); in ms_event()
275 return 1; in ms_event()
283 struct ms_data *ms = container_of(work, struct ms_data, ff_worker); in ms_ff_worker() local
284 struct hid_device *hdev = ms->hdev; in ms_ff_worker()
285 struct xb1s_ff_report *r = ms->output_report_dmabuf; in ms_ff_worker()
295 * ms in ms_ff_worker()
299 r->magnitude[MAGNITUDE_STRONG] = ms->strong; /* left actuator */ in ms_ff_worker()
300 r->magnitude[MAGNITUDE_WEAK] = ms->weak; /* right actuator */ in ms_ff_worker()
311 struct ms_data *ms = hid_get_drvdata(hid); in ms_play_effect() local
319 ms->strong = ((u32) effect->u.rumble.strong_magnitude * 100) / U16_MAX; in ms_play_effect()
320 ms->weak = ((u32) effect->u.rumble.weak_magnitude * 100) / U16_MAX; in ms_play_effect()
322 schedule_work(&ms->ff_worker); in ms_play_effect()
330 struct ms_data *ms = hid_get_drvdata(hdev); in ms_init_ff() local
339 if (!(ms->quirks & MS_QUIRK_FF)) in ms_init_ff()
342 ms->hdev = hdev; in ms_init_ff()
343 INIT_WORK(&ms->ff_worker, ms_ff_worker); in ms_init_ff()
345 ms->output_report_dmabuf = devm_kzalloc(&hdev->dev, in ms_init_ff()
348 if (ms->output_report_dmabuf == NULL) in ms_init_ff()
357 struct ms_data *ms = hid_get_drvdata(hdev); in ms_remove_ff() local
359 if (!(ms->quirks & MS_QUIRK_FF)) in ms_remove_ff()
362 cancel_work_sync(&ms->ff_worker); in ms_remove_ff()
368 struct ms_data *ms; in ms_probe() local
371 ms = devm_kzalloc(&hdev->dev, sizeof(*ms), GFP_KERNEL); in ms_probe()
372 if (ms == NULL) in ms_probe()
375 ms->quirks = quirks; in ms_probe()
377 hid_set_drvdata(hdev, ms); in ms_probe()