Searched refs:pyra (Results 1 - 2 of 2) sorted by relevance

/linux-4.1.27/drivers/hid/
H A Dhid-roccat-pyra.c28 #include "hid-roccat-pyra.h"
35 static void profile_activated(struct pyra_device *pyra, profile_activated() argument
38 if (new_profile >= ARRAY_SIZE(pyra->profile_settings)) profile_activated()
40 pyra->actual_profile = new_profile; profile_activated()
41 pyra->actual_cpi = pyra->profile_settings[pyra->actual_profile].y_cpi; profile_activated()
95 struct pyra_device *pyra = hid_get_drvdata(dev_get_drvdata(dev)); pyra_sysfs_read() local
105 mutex_lock(&pyra->pyra_lock); pyra_sysfs_read()
107 mutex_unlock(&pyra->pyra_lock); pyra_sysfs_read()
121 struct pyra_device *pyra = hid_get_drvdata(dev_get_drvdata(dev)); pyra_sysfs_write() local
128 mutex_lock(&pyra->pyra_lock); pyra_sysfs_write()
130 mutex_unlock(&pyra->pyra_lock); pyra_sysfs_write()
253 struct pyra_device *pyra = hid_get_drvdata(dev_get_drvdata(dev)); pyra_sysfs_write_settings() local
263 if (settings->startup_profile >= ARRAY_SIZE(pyra->profile_settings)) pyra_sysfs_write_settings()
266 mutex_lock(&pyra->pyra_lock); pyra_sysfs_write_settings()
270 mutex_unlock(&pyra->pyra_lock); pyra_sysfs_write_settings()
274 profile_activated(pyra, settings->startup_profile); pyra_sysfs_write_settings()
279 roccat_report_event(pyra->chrdev_minor, pyra_sysfs_write_settings()
282 mutex_unlock(&pyra->pyra_lock); pyra_sysfs_write_settings()
295 struct pyra_device *pyra = pyra_sysfs_show_actual_cpi() local
297 return snprintf(buf, PAGE_SIZE, "%d\n", pyra->actual_cpi); pyra_sysfs_show_actual_cpi()
304 struct pyra_device *pyra = pyra_sysfs_show_actual_profile() local
309 mutex_lock(&pyra->pyra_lock); pyra_sysfs_show_actual_profile()
312 mutex_unlock(&pyra->pyra_lock); pyra_sysfs_show_actual_profile()
322 struct pyra_device *pyra; pyra_sysfs_show_firmware_version() local
327 pyra = hid_get_drvdata(dev_get_drvdata(dev)); pyra_sysfs_show_firmware_version()
330 mutex_lock(&pyra->pyra_lock); pyra_sysfs_show_firmware_version()
333 mutex_unlock(&pyra->pyra_lock); pyra_sysfs_show_firmware_version()
378 struct pyra_device *pyra) pyra_init_pyra_device_struct()
383 mutex_init(&pyra->pyra_lock); pyra_init_pyra_device_struct()
391 &pyra->profile_settings[i], i); pyra_init_pyra_device_struct()
396 profile_activated(pyra, settings.startup_profile); pyra_init_pyra_device_struct()
405 struct pyra_device *pyra; pyra_init_specials() local
411 pyra = kzalloc(sizeof(*pyra), GFP_KERNEL); pyra_init_specials()
412 if (!pyra) { pyra_init_specials()
416 hid_set_drvdata(hdev, pyra); pyra_init_specials()
418 retval = pyra_init_pyra_device_struct(usb_dev, pyra); pyra_init_specials()
429 pyra->chrdev_minor = retval; pyra_init_specials()
430 pyra->roccat_claimed = 1; pyra_init_specials()
438 kfree(pyra); pyra_init_specials()
445 struct pyra_device *pyra; pyra_remove_specials() local
449 pyra = hid_get_drvdata(hdev); pyra_remove_specials()
450 if (pyra->roccat_claimed) pyra_remove_specials()
451 roccat_disconnect(pyra->chrdev_minor); pyra_remove_specials()
491 static void pyra_keep_values_up_to_date(struct pyra_device *pyra, pyra_keep_values_up_to_date() argument
501 profile_activated(pyra, button_event->data1 - 1); pyra_keep_values_up_to_date()
504 pyra->actual_cpi = button_event->data1; pyra_keep_values_up_to_date()
511 static void pyra_report_to_chrdev(struct pyra_device const *pyra, pyra_report_to_chrdev() argument
528 roccat_report_event(pyra->chrdev_minor, pyra_report_to_chrdev()
538 * pyra reports profile numbers with range 1-5. pyra_report_to_chrdev()
541 roccat_report.value = pyra->actual_profile + 1; pyra_report_to_chrdev()
542 roccat_report_event(pyra->chrdev_minor, pyra_report_to_chrdev()
553 struct pyra_device *pyra = hid_get_drvdata(hdev); pyra_raw_event() local
559 if (pyra == NULL) pyra_raw_event()
562 pyra_keep_values_up_to_date(pyra, data); pyra_raw_event()
564 if (pyra->roccat_claimed) pyra_raw_event()
565 pyra_report_to_chrdev(pyra, data); pyra_raw_event()
581 .name = "pyra",
593 pyra_class = class_create(THIS_MODULE, "pyra"); pyra_init()
377 pyra_init_pyra_device_struct(struct usb_device *usb_dev, struct pyra_device *pyra) pyra_init_pyra_device_struct() argument
H A DMakefile78 hid-roccat-lua.o hid-roccat-pyra.o hid-roccat-ryos.o hid-roccat-savu.o

Completed in 78 milliseconds