Lines Matching +full:report +full:- +full:error

1 // SPDX-License-Identifier: GPL-2.0-or-later
10 * - tested with an EXEQ EQ-PCU-02090 game controller.
12 * Copyright (c) 2010 Sergei Kolzun <x0r@dv-life.ru>
23 #include "hid-ids.h"
28 struct hid_report *report; member
35 struct hid_report *report = axff->report; in axff_play() local
40 left = effect->u.rumble.strong_magnitude; in axff_play()
41 right = effect->u.rumble.weak_magnitude; in axff_play()
48 for (i = 0; i < report->maxfield; i++) { in axff_play()
49 for (j = 0; j < report->field[i]->report_count; j++) { in axff_play()
50 report->field[i]->value[j] = in axff_play()
57 hid_hw_request(hid, axff->report, HID_REQ_SET_REPORT); in axff_play()
65 struct hid_report *report; in axff_init() local
67 struct list_head *report_list =&hid->report_enum[HID_OUTPUT_REPORT].report_list; in axff_init()
71 int error; in axff_init() local
73 if (list_empty(&hid->inputs)) { in axff_init()
75 return -ENODEV; in axff_init()
77 hidinput = list_first_entry(&hid->inputs, struct hid_input, list); in axff_init()
78 dev = hidinput->input; in axff_init()
82 return -ENODEV; in axff_init()
85 report = list_first_entry(report_list, struct hid_report, list); in axff_init()
86 for (i = 0; i < report->maxfield; i++) { in axff_init()
87 for (j = 0; j < report->field[i]->report_count; j++) { in axff_init()
88 report->field[i]->value[j] = 0x00; in axff_init()
93 if (field_count < 4 && hid->product != 0xf705) { in axff_init()
94 hid_err(hid, "not enough fields in the report: %d\n", in axff_init()
96 return -ENODEV; in axff_init()
101 return -ENOMEM; in axff_init()
103 set_bit(FF_RUMBLE, dev->ffbit); in axff_init()
105 error = input_ff_create_memless(dev, axff, axff_play); in axff_init()
106 if (error) in axff_init()
109 axff->report = report; in axff_init()
110 hid_hw_request(hid, axff->report, HID_REQ_SET_REPORT); in axff_init()
112 hid_info(hid, "Force Feedback for ACRUX game controllers by Sergei Kolzun <x0r@dv-life.ru>\n"); in axff_init()
118 return error; in axff_init()
129 int error; in ax_probe() local
131 dev_dbg(&hdev->dev, "ACRUX HID hardware probe...\n"); in ax_probe()
133 error = hid_parse(hdev); in ax_probe()
134 if (error) { in ax_probe()
136 return error; in ax_probe()
139 error = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); in ax_probe()
140 if (error) { in ax_probe()
142 return error; in ax_probe()
145 error = axff_init(hdev); in ax_probe()
146 if (error) { in ax_probe()
152 "Failed to enable force feedback support, error: %d\n", in ax_probe()
153 error); in ax_probe()
160 error = hid_hw_open(hdev); in ax_probe()
161 if (error) { in ax_probe()
162 dev_err(&hdev->dev, "hw open failed\n"); in ax_probe()
164 return error; in ax_probe()