Lines Matching full:hid

10 #include <linux/hid.h>
20 * amdtp_hid_parse() - hid-core .parse() callback
21 * @hid: hid device instance
27 static int amdtp_hid_parse(struct hid_device *hid) in amdtp_hid_parse() argument
29 struct amdtp_hid_data *hid_data = hid->driver_data; in amdtp_hid_parse()
32 return hid_parse_report(hid, cli_data->report_descr[hid_data->index], in amdtp_hid_parse()
37 static int amdtp_hid_start(struct hid_device *hid) in amdtp_hid_start() argument
42 static void amdtp_hid_stop(struct hid_device *hid) in amdtp_hid_stop() argument
46 static int amdtp_hid_open(struct hid_device *hid) in amdtp_hid_open() argument
51 static void amdtp_hid_close(struct hid_device *hid) in amdtp_hid_close() argument
61 static void amdtp_hid_request(struct hid_device *hid, struct hid_report *rep, int reqtype) in amdtp_hid_request() argument
67 rc = amd_sfh_get_report(hid, rep->id, rep->type); in amdtp_hid_request()
69 dev_err(&hid->dev, "AMDSFH get report error\n"); in amdtp_hid_request()
72 amd_sfh_set_report(hid, rep->id, reqtype); in amdtp_hid_request()
79 static int amdtp_wait_for_response(struct hid_device *hid) in amdtp_wait_for_response() argument
81 struct amdtp_hid_data *hid_data = hid->driver_data; in amdtp_wait_for_response()
86 if (cli_data->hid_sensor_hubs[i] == hid) in amdtp_wait_for_response()
102 void amdtp_hid_wakeup(struct hid_device *hid) in amdtp_hid_wakeup() argument
107 if (hid) { in amdtp_hid_wakeup()
108 hid_data = hid->driver_data; in amdtp_hid_wakeup()
130 struct hid_device *hid; in amdtp_hid_probe() local
134 hid = hid_allocate_device(); in amdtp_hid_probe()
135 if (IS_ERR(hid)) in amdtp_hid_probe()
136 return PTR_ERR(hid); in amdtp_hid_probe()
144 hid->ll_driver = &amdtp_hid_ll_driver; in amdtp_hid_probe()
149 hid->driver_data = hid_data; in amdtp_hid_probe()
150 cli_data->hid_sensor_hubs[cur_hid_dev] = hid; in amdtp_hid_probe()
151 strscpy(hid->phys, dev->driver ? dev->driver->name : dev_name(dev), in amdtp_hid_probe()
152 sizeof(hid->phys)); in amdtp_hid_probe()
153 hid->bus = BUS_AMD_SFH; in amdtp_hid_probe()
154 hid->vendor = AMD_SFH_HID_VENDOR; in amdtp_hid_probe()
155 hid->product = AMD_SFH_HID_PRODUCT; in amdtp_hid_probe()
156 snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", "hid-amdsfh", in amdtp_hid_probe()
157 hid->vendor, hid->product); in amdtp_hid_probe()
159 rc = hid_add_device(hid); in amdtp_hid_probe()
167 hid_destroy_device(hid); in amdtp_hid_probe()