Lines Matching refs:hdev
275 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in mt_show_quirks() local
276 struct mt_device *td = hid_get_drvdata(hdev); in mt_show_quirks()
285 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in mt_set_quirks() local
286 struct mt_device *td = hid_get_drvdata(hdev); in mt_set_quirks()
312 static void mt_feature_mapping(struct hid_device *hdev, in mt_feature_mapping() argument
315 struct mt_device *td = hid_get_drvdata(hdev); in mt_feature_mapping()
321 dev_err(&hdev->dev, "HID_DG_INPUTMODE out of range\n"); in mt_feature_mapping()
335 dev_info(&hdev->dev, in mt_feature_mapping()
353 dev_err(&hdev->dev, "HID_DG_BUTTONTYPE out of range\n"); in mt_feature_mapping()
385 static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, in mt_touch_input_mapping() argument
389 struct mt_device *td = hid_get_drvdata(hdev); in mt_touch_input_mapping()
534 static int mt_touch_input_mapped(struct hid_device *hdev, struct hid_input *hi, in mt_touch_input_mapped() argument
739 static void mt_touch_input_configured(struct hid_device *hdev, in mt_touch_input_configured() argument
742 struct mt_device *td = hid_get_drvdata(hdev); in mt_touch_input_configured()
771 static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, in mt_input_mapping() argument
775 struct mt_device *td = hid_get_drvdata(hdev); in mt_input_mapping()
798 return mt_touch_input_mapping(hdev, hi, field, usage, bit, max); in mt_input_mapping()
804 static int mt_input_mapped(struct hid_device *hdev, struct hid_input *hi, in mt_input_mapped() argument
817 return mt_touch_input_mapped(hdev, hi, field, usage, bit, max); in mt_input_mapped()
849 static void mt_set_input_mode(struct hid_device *hdev) in mt_set_input_mode() argument
851 struct mt_device *td = hid_get_drvdata(hdev); in mt_set_input_mode()
861 re = &(hdev->report_enum[HID_FEATURE_REPORT]); in mt_set_input_mode()
868 hid_err(hdev, "failed to allocate buffer for report\n"); in mt_set_input_mode()
871 hid_hw_raw_request(hdev, r->id, buf, report_len, in mt_set_input_mode()
877 hid_hw_request(hdev, r, HID_REQ_SET_REPORT); in mt_set_input_mode()
881 static void mt_set_maxcontacts(struct hid_device *hdev) in mt_set_maxcontacts() argument
883 struct mt_device *td = hid_get_drvdata(hdev); in mt_set_maxcontacts()
894 re = &hdev->report_enum[HID_FEATURE_REPORT]; in mt_set_maxcontacts()
902 hid_hw_request(hdev, r, HID_REQ_SET_REPORT); in mt_set_maxcontacts()
937 static void mt_input_configured(struct hid_device *hdev, struct hid_input *hi) in mt_input_configured() argument
939 struct mt_device *td = hid_get_drvdata(hdev); in mt_input_configured()
945 mt_touch_input_configured(hdev, hi); in mt_input_configured()
989 strlen(hdev->name) + strlen(suffix) + 2, in mt_input_configured()
992 sprintf(name, "%s %s", hdev->name, suffix); in mt_input_configured()
998 static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) in mt_probe() argument
1014 hdev->quirks |= HID_QUIRK_NO_INPUT_SYNC; in mt_probe()
1021 hdev->quirks |= HID_QUIRK_MULTI_INPUT; in mt_probe()
1022 hdev->quirks |= HID_QUIRK_NO_EMPTY_INPUT; in mt_probe()
1034 hdev->quirks |= HID_QUIRK_NO_INIT_INPUT_REPORTS; in mt_probe()
1036 td = devm_kzalloc(&hdev->dev, sizeof(struct mt_device), GFP_KERNEL); in mt_probe()
1038 dev_err(&hdev->dev, "cannot allocate multitouch data\n"); in mt_probe()
1047 hid_set_drvdata(hdev, td); in mt_probe()
1049 td->fields = devm_kzalloc(&hdev->dev, sizeof(struct mt_fields), in mt_probe()
1052 dev_err(&hdev->dev, "cannot allocate multitouch fields data\n"); in mt_probe()
1059 ret = hid_parse(hdev); in mt_probe()
1063 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); in mt_probe()
1067 ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group); in mt_probe()
1069 mt_set_maxcontacts(hdev); in mt_probe()
1070 mt_set_input_mode(hdev); in mt_probe()
1073 devm_kfree(&hdev->dev, td->fields); in mt_probe()
1080 static int mt_reset_resume(struct hid_device *hdev) in mt_reset_resume() argument
1082 mt_set_maxcontacts(hdev); in mt_reset_resume()
1083 mt_set_input_mode(hdev); in mt_reset_resume()
1087 static int mt_resume(struct hid_device *hdev) in mt_resume() argument
1093 hid_hw_idle(hdev, 0, 0, HID_REQ_SET_IDLE); in mt_resume()
1099 static void mt_remove(struct hid_device *hdev) in mt_remove() argument
1101 sysfs_remove_group(&hdev->dev.kobj, &mt_attribute_group); in mt_remove()
1102 hid_hw_stop(hdev); in mt_remove()