• Home
  • Raw
  • Download

Lines Matching refs:kovaplus

34 static void kovaplus_profile_activated(struct kovaplus_device *kovaplus,  in kovaplus_profile_activated()  argument
37 if (new_profile_index >= ARRAY_SIZE(kovaplus->profile_settings)) in kovaplus_profile_activated()
39 kovaplus->actual_profile = new_profile_index; in kovaplus_profile_activated()
40 kovaplus->actual_cpi = kovaplus->profile_settings[new_profile_index].cpi_startup_level; in kovaplus_profile_activated()
41 kovaplus->actual_x_sensitivity = kovaplus->profile_settings[new_profile_index].sensitivity_x; in kovaplus_profile_activated()
42 kovaplus->actual_y_sensitivity = kovaplus->profile_settings[new_profile_index].sensitivity_y; in kovaplus_profile_activated()
131 struct kovaplus_device *kovaplus = hid_get_drvdata(dev_get_drvdata(dev)); in kovaplus_sysfs_read() local
141 mutex_lock(&kovaplus->kovaplus_lock); in kovaplus_sysfs_read()
143 mutex_unlock(&kovaplus->kovaplus_lock); in kovaplus_sysfs_read()
156 struct kovaplus_device *kovaplus = hid_get_drvdata(dev_get_drvdata(dev)); in kovaplus_sysfs_write() local
163 mutex_lock(&kovaplus->kovaplus_lock); in kovaplus_sysfs_write()
166 mutex_unlock(&kovaplus->kovaplus_lock); in kovaplus_sysfs_write()
275 struct kovaplus_device *kovaplus = in kovaplus_sysfs_show_actual_profile() local
277 return snprintf(buf, PAGE_SIZE, "%d\n", kovaplus->actual_profile); in kovaplus_sysfs_show_actual_profile()
283 struct kovaplus_device *kovaplus; in kovaplus_sysfs_set_actual_profile() local
290 kovaplus = hid_get_drvdata(dev_get_drvdata(dev)); in kovaplus_sysfs_set_actual_profile()
300 mutex_lock(&kovaplus->kovaplus_lock); in kovaplus_sysfs_set_actual_profile()
303 mutex_unlock(&kovaplus->kovaplus_lock); in kovaplus_sysfs_set_actual_profile()
307 kovaplus_profile_activated(kovaplus, profile); in kovaplus_sysfs_set_actual_profile()
314 roccat_report_event(kovaplus->chrdev_minor, in kovaplus_sysfs_set_actual_profile()
317 mutex_unlock(&kovaplus->kovaplus_lock); in kovaplus_sysfs_set_actual_profile()
328 struct kovaplus_device *kovaplus = in kovaplus_sysfs_show_actual_cpi() local
330 return snprintf(buf, PAGE_SIZE, "%d\n", kovaplus->actual_cpi); in kovaplus_sysfs_show_actual_cpi()
337 struct kovaplus_device *kovaplus = in kovaplus_sysfs_show_actual_sensitivity_x() local
339 return snprintf(buf, PAGE_SIZE, "%d\n", kovaplus->actual_x_sensitivity); in kovaplus_sysfs_show_actual_sensitivity_x()
347 struct kovaplus_device *kovaplus = in kovaplus_sysfs_show_actual_sensitivity_y() local
349 return snprintf(buf, PAGE_SIZE, "%d\n", kovaplus->actual_y_sensitivity); in kovaplus_sysfs_show_actual_sensitivity_y()
357 struct kovaplus_device *kovaplus; in kovaplus_sysfs_show_firmware_version() local
362 kovaplus = hid_get_drvdata(dev_get_drvdata(dev)); in kovaplus_sysfs_show_firmware_version()
365 mutex_lock(&kovaplus->kovaplus_lock); in kovaplus_sysfs_show_firmware_version()
368 mutex_unlock(&kovaplus->kovaplus_lock); in kovaplus_sysfs_show_firmware_version()
413 struct kovaplus_device *kovaplus) in kovaplus_init_kovaplus_device_struct() argument
418 mutex_init(&kovaplus->kovaplus_lock); in kovaplus_init_kovaplus_device_struct()
423 &kovaplus->profile_settings[i], i); in kovaplus_init_kovaplus_device_struct()
429 &kovaplus->profile_buttons[i], i); in kovaplus_init_kovaplus_device_struct()
438 kovaplus_profile_activated(kovaplus, retval); in kovaplus_init_kovaplus_device_struct()
447 struct kovaplus_device *kovaplus; in kovaplus_init_specials() local
453 kovaplus = kzalloc(sizeof(*kovaplus), GFP_KERNEL); in kovaplus_init_specials()
454 if (!kovaplus) { in kovaplus_init_specials()
458 hid_set_drvdata(hdev, kovaplus); in kovaplus_init_specials()
460 retval = kovaplus_init_kovaplus_device_struct(usb_dev, kovaplus); in kovaplus_init_specials()
471 kovaplus->chrdev_minor = retval; in kovaplus_init_specials()
472 kovaplus->roccat_claimed = 1; in kovaplus_init_specials()
481 kfree(kovaplus); in kovaplus_init_specials()
488 struct kovaplus_device *kovaplus; in kovaplus_remove_specials() local
492 kovaplus = hid_get_drvdata(hdev); in kovaplus_remove_specials()
493 if (kovaplus->roccat_claimed) in kovaplus_remove_specials()
494 roccat_disconnect(kovaplus->chrdev_minor); in kovaplus_remove_specials()
495 kfree(kovaplus); in kovaplus_remove_specials()
536 static void kovaplus_keep_values_up_to_date(struct kovaplus_device *kovaplus, in kovaplus_keep_values_up_to_date() argument
548 kovaplus_profile_activated(kovaplus, button_report->data1 - 1); in kovaplus_keep_values_up_to_date()
551 kovaplus->actual_cpi = kovaplus_convert_event_cpi(button_report->data1); in kovaplus_keep_values_up_to_date()
554 kovaplus->actual_x_sensitivity = button_report->data1; in kovaplus_keep_values_up_to_date()
555 kovaplus->actual_y_sensitivity = button_report->data2; in kovaplus_keep_values_up_to_date()
562 static void kovaplus_report_to_chrdev(struct kovaplus_device const *kovaplus, in kovaplus_report_to_chrdev() argument
577 roccat_report.profile = kovaplus->actual_profile + 1; in kovaplus_report_to_chrdev()
594 roccat_report_event(kovaplus->chrdev_minor, in kovaplus_report_to_chrdev()
602 struct kovaplus_device *kovaplus = hid_get_drvdata(hdev); in kovaplus_raw_event() local
608 if (kovaplus == NULL) in kovaplus_raw_event()
611 kovaplus_keep_values_up_to_date(kovaplus, data); in kovaplus_raw_event()
613 if (kovaplus->roccat_claimed) in kovaplus_raw_event()
614 kovaplus_report_to_chrdev(kovaplus, data); in kovaplus_raw_event()