Lines Matching +full:counter +full:- +full:clockwise
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Force feedback support for hid-compliant for some of the devices from
5 * - WingMan Cordless RumblePad
6 * - WingMan Force 3D
8 * Copyright (c) 2002-2004 Johann Deneux
15 * e-mail - mail your message to <johann.deneux@it.uu.se>
23 #include "hid-lg.h"
33 -1
38 -1
44 -1
60 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; in hid_lgff_play()
61 struct hid_report *report = list_entry(report_list->next, struct hid_report, list); in hid_lgff_play()
67 switch (effect->type) { in hid_lgff_play()
69 x = effect->u.ramp.start_level + 0x7f; /* 0x7f is center */ in hid_lgff_play()
70 y = effect->u.ramp.end_level + 0x7f; in hid_lgff_play()
73 report->field[0]->value[0] = 0x51; in hid_lgff_play()
74 report->field[0]->value[1] = 0x08; in hid_lgff_play()
75 report->field[0]->value[2] = x; in hid_lgff_play()
76 report->field[0]->value[3] = y; in hid_lgff_play()
82 right = effect->u.rumble.strong_magnitude; in hid_lgff_play()
83 left = effect->u.rumble.weak_magnitude; in hid_lgff_play()
88 report->field[0]->value[0] = 0x42; in hid_lgff_play()
89 report->field[0]->value[1] = 0x00; in hid_lgff_play()
90 report->field[0]->value[2] = left; in hid_lgff_play()
91 report->field[0]->value[3] = right; in hid_lgff_play()
102 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; in hid_lgff_set_autocenter()
103 struct hid_report *report = list_entry(report_list->next, struct hid_report, list); in hid_lgff_set_autocenter()
104 __s32 *value = report->field[0]->value; in hid_lgff_set_autocenter()
108 *value++ = magnitude; /* clockwise strength */ in hid_lgff_set_autocenter()
109 *value++ = magnitude; /* counter-clockwise strength */ in hid_lgff_set_autocenter()
124 if (list_empty(&hid->inputs)) { in lgff_init()
126 return -ENODEV; in lgff_init()
128 hidinput = list_entry(hid->inputs.next, struct hid_input, list); in lgff_init()
129 dev = hidinput->input; in lgff_init()
133 return -ENODEV; in lgff_init()
136 if (dev->id.vendor == devices[i].idVendor && in lgff_init()
137 dev->id.product == devices[i].idProduct) { in lgff_init()
144 set_bit(ff_bits[i], dev->ffbit); in lgff_init()
150 if ( test_bit(FF_AUTOCENTER, dev->ffbit) ) in lgff_init()
151 dev->ff->set_autocenter = hid_lgff_set_autocenter; in lgff_init()