Lines Matching full:i

26 	int i;  in amd_sfh_set_report()  local
28 for (i = 0; i < cli_data->num_hid_devices; i++) { in amd_sfh_set_report()
29 if (cli_data->hid_sensor_hubs[i] == hid) { in amd_sfh_set_report()
30 cli_data->cur_hid_dev = i; in amd_sfh_set_report()
42 int i; in amd_sfh_get_report() local
44 for (i = 0; i < cli_data->num_hid_devices; i++) { in amd_sfh_get_report()
45 if (cli_data->hid_sensor_hubs[i] == hid) { in amd_sfh_get_report()
51 new->current_index = i; in amd_sfh_get_report()
52 new->sensor_idx = cli_data->sensor_idx[i]; in amd_sfh_get_report()
56 cli_data->report_id[i] = report_id; in amd_sfh_get_report()
57 cli_data->request_done[i] = false; in amd_sfh_get_report()
118 int i; in amd_sfh_work_buffer() local
120 for (i = 0; i < cli_data->num_hid_devices; i++) { in amd_sfh_work_buffer()
121 if (cli_data->sensor_sts[i] == SENSOR_ENABLED) { in amd_sfh_work_buffer()
123 report_size = mp2->mp2_ops->get_in_rep(i, cli_data->sensor_idx[i], in amd_sfh_work_buffer()
124 cli_data->report_id[i], in_data); in amd_sfh_work_buffer()
125 hid_input_report(cli_data->hid_sensor_hubs[i], HID_INPUT_REPORT, in amd_sfh_work_buffer()
126 in_data->input_report[i], report_size, 0); in amd_sfh_work_buffer()
162 int i, status; in amd_sfh_resume() local
164 for (i = 0; i < cl_data->num_hid_devices; i++) { in amd_sfh_resume()
165 if (cl_data->sensor_sts[i] == SENSOR_DISABLED) { in amd_sfh_resume()
167 info.sensor_idx = cl_data->sensor_idx[i]; in amd_sfh_resume()
168 info.dma_address = cl_data->sensor_dma_addr[i]; in amd_sfh_resume()
171 (mp2, cl_data->sensor_idx[i], SENSOR_ENABLED); in amd_sfh_resume()
173 cl_data->sensor_sts[i] = SENSOR_ENABLED; in amd_sfh_resume()
175 cl_data->sensor_idx[i], get_sensor_name(cl_data->sensor_idx[i]), in amd_sfh_resume()
176 cl_data->sensor_sts[i]); in amd_sfh_resume()
187 int i, status; in amd_sfh_suspend() local
189 for (i = 0; i < cl_data->num_hid_devices; i++) { in amd_sfh_suspend()
190 if (cl_data->sensor_idx[i] != HPD_IDX && in amd_sfh_suspend()
191 cl_data->sensor_sts[i] == SENSOR_ENABLED) { in amd_sfh_suspend()
192 mp2->mp2_ops->stop(mp2, cl_data->sensor_idx[i]); in amd_sfh_suspend()
194 (mp2, cl_data->sensor_idx[i], SENSOR_DISABLED); in amd_sfh_suspend()
196 cl_data->sensor_sts[i] = SENSOR_DISABLED; in amd_sfh_suspend()
198 cl_data->sensor_idx[i], get_sensor_name(cl_data->sensor_idx[i]), in amd_sfh_suspend()
199 cl_data->sensor_sts[i]); in amd_sfh_suspend()
217 int rc, i, status; in amd_sfh_hid_client_init() local
236 for (i = 0; i < cl_data->num_hid_devices; i++) { in amd_sfh_hid_client_init()
237 in_data->sensor_virt_addr[i] = dma_alloc_coherent(dev, sizeof(int) * 8, in amd_sfh_hid_client_init()
238 &cl_data->sensor_dma_addr[i], in amd_sfh_hid_client_init()
240 cl_data->sensor_sts[i] = SENSOR_DISABLED; in amd_sfh_hid_client_init()
241 cl_data->sensor_requested_cnt[i] = 0; in amd_sfh_hid_client_init()
242 cl_data->cur_hid_dev = i; in amd_sfh_hid_client_init()
243 cl_idx = cl_data->sensor_idx[i]; in amd_sfh_hid_client_init()
244 cl_data->report_descr_sz[i] = mp2_ops->get_desc_sz(cl_idx, descr_size); in amd_sfh_hid_client_init()
245 if (!cl_data->report_descr_sz[i]) { in amd_sfh_hid_client_init()
259 cl_data->feature_report[i] = devm_kzalloc(dev, feature_report_size, GFP_KERNEL); in amd_sfh_hid_client_init()
260 if (!cl_data->feature_report[i]) { in amd_sfh_hid_client_init()
264 in_data->input_report[i] = devm_kzalloc(dev, input_report_size, GFP_KERNEL); in amd_sfh_hid_client_init()
265 if (!in_data->input_report[i]) { in amd_sfh_hid_client_init()
271 info.dma_address = cl_data->sensor_dma_addr[i]; in amd_sfh_hid_client_init()
273 cl_data->report_descr[i] = in amd_sfh_hid_client_init()
274 devm_kzalloc(dev, cl_data->report_descr_sz[i], GFP_KERNEL); in amd_sfh_hid_client_init()
275 if (!cl_data->report_descr[i]) { in amd_sfh_hid_client_init()
279 rc = mp2_ops->get_rep_desc(cl_idx, cl_data->report_descr[i]); in amd_sfh_hid_client_init()
284 (privdata, cl_data->sensor_idx[i], SENSOR_ENABLED); in amd_sfh_hid_client_init()
286 cl_data->sensor_sts[i] = SENSOR_ENABLED; in amd_sfh_hid_client_init()
289 mp2_ops->stop(privdata, cl_data->sensor_idx[i]); in amd_sfh_hid_client_init()
291 (privdata, cl_data->sensor_idx[i], SENSOR_DISABLED); in amd_sfh_hid_client_init()
293 cl_data->sensor_sts[i] = SENSOR_DISABLED; in amd_sfh_hid_client_init()
295 cl_data->sensor_idx[i], in amd_sfh_hid_client_init()
296 get_sensor_name(cl_data->sensor_idx[i]), in amd_sfh_hid_client_init()
297 cl_data->sensor_sts[i]); in amd_sfh_hid_client_init()
302 cl_data->sensor_idx[i], get_sensor_name(cl_data->sensor_idx[i]), in amd_sfh_hid_client_init()
303 cl_data->sensor_sts[i]); in amd_sfh_hid_client_init()
307 for (i = 0; i < cl_data->num_hid_devices; i++) { in amd_sfh_hid_client_init()
308 devm_kfree(dev, cl_data->feature_report[i]); in amd_sfh_hid_client_init()
309 devm_kfree(dev, in_data->input_report[i]); in amd_sfh_hid_client_init()
310 devm_kfree(dev, cl_data->report_descr[i]); in amd_sfh_hid_client_init()
319 for (i = 0; i < cl_data->num_hid_devices; i++) { in amd_sfh_hid_client_init()
320 if (in_data->sensor_virt_addr[i]) { in amd_sfh_hid_client_init()
322 in_data->sensor_virt_addr[i], in amd_sfh_hid_client_init()
323 cl_data->sensor_dma_addr[i]); in amd_sfh_hid_client_init()
325 devm_kfree(dev, cl_data->feature_report[i]); in amd_sfh_hid_client_init()
326 devm_kfree(dev, in_data->input_report[i]); in amd_sfh_hid_client_init()
327 devm_kfree(dev, cl_data->report_descr[i]); in amd_sfh_hid_client_init()
336 int i, status; in amd_sfh_hid_client_deinit() local
338 for (i = 0; i < cl_data->num_hid_devices; i++) { in amd_sfh_hid_client_deinit()
339 if (cl_data->sensor_sts[i] == SENSOR_ENABLED) { in amd_sfh_hid_client_deinit()
340 privdata->mp2_ops->stop(privdata, cl_data->sensor_idx[i]); in amd_sfh_hid_client_deinit()
342 (privdata, cl_data->sensor_idx[i], SENSOR_DISABLED); in amd_sfh_hid_client_deinit()
344 cl_data->sensor_sts[i] = SENSOR_DISABLED; in amd_sfh_hid_client_deinit()
346 cl_data->sensor_idx[i], get_sensor_name(cl_data->sensor_idx[i]), in amd_sfh_hid_client_deinit()
347 cl_data->sensor_sts[i]); in amd_sfh_hid_client_deinit()
355 for (i = 0; i < cl_data->num_hid_devices; i++) { in amd_sfh_hid_client_deinit()
356 if (in_data->sensor_virt_addr[i]) { in amd_sfh_hid_client_deinit()
358 in_data->sensor_virt_addr[i], in amd_sfh_hid_client_deinit()
359 cl_data->sensor_dma_addr[i]); in amd_sfh_hid_client_deinit()