Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: roccat: deprecate some Kovaplus attributes

Introduced attribute "control" and made profile_settings and profile_buttons
readable, which makes profile[1-5]_settings and profile[1-5]_buttons obsolete.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Stefan Achatz and committed by
Jiri Kosina
172e2abc bb060d65

+37 -29
+25
Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus
··· 39 39 This file is readonly. 40 40 Obsoleted by binary sysfs attribute "info". 41 41 Users: http://roccat.sourceforge.net 42 + 43 + What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons 44 + Date: January 2011 45 + Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 46 + Description: The mouse can store 5 profiles which can be switched by the 47 + press of a button. A profile is split in settings and buttons. 48 + profile_buttons holds information about button layout. 49 + When read, these files return the respective profile buttons. 50 + The returned data is 23 bytes in size. 51 + This file is readonly. 52 + Write control to select profile and read profile_buttons instead. 53 + Users: http://roccat.sourceforge.net 54 + 55 + What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings 56 + Date: January 2011 57 + Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 58 + Description: The mouse can store 5 profiles which can be switched by the 59 + press of a button. A profile is split in settings and buttons. 60 + profile_settings holds information like resolution, sensitivity 61 + and light effects. 62 + When read, these files return the respective profile settings. 63 + The returned data is 16 bytes in size. 64 + This file is readonly. 65 + Write control to select profile and read profile_settings instead. 66 + Users: http://roccat.sourceforge.net
+4 -25
Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
··· 28 28 The mouse will reject invalid data. 29 29 Which profile to write is determined by the profile number 30 30 contained in the data. 31 - This file is writeonly. 32 - Users: http://roccat.sourceforge.net 33 - 34 - What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons 35 - Date: January 2011 36 - Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 37 - Description: The mouse can store 5 profiles which can be switched by the 38 - press of a button. A profile is split in settings and buttons. 39 - profile_buttons holds information about button layout. 40 - When read, these files return the respective profile buttons. 41 - The returned data is 23 bytes in size. 42 - This file is readonly. 31 + Before reading this file, control has to be written to select 32 + which profile to read. 43 33 Users: http://roccat.sourceforge.net 44 34 45 35 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings ··· 44 54 The mouse will reject invalid data. 45 55 Which profile to write is determined by the profile number 46 56 contained in the data. 47 - This file is writeonly. 48 - Users: http://roccat.sourceforge.net 49 - 50 - What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings 51 - Date: January 2011 52 - Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 53 - Description: The mouse can store 5 profiles which can be switched by the 54 - press of a button. A profile is split in settings and buttons. 55 - profile_settings holds information like resolution, sensitivity 56 - and light effects. 57 - When read, these files return the respective profile settings. 58 - The returned data is 16 bytes in size. 59 - This file is readonly. 57 + Before reading this file, control has to be written to select 58 + which profile to read. 60 59 Users: http://roccat.sourceforge.net
+6 -4
drivers/hid/hid-roccat-kovaplus.c
··· 218 218 .write = kovaplus_sysfs_write_ ## thingy \ 219 219 } 220 220 221 + KOVAPLUS_SYSFS_W(control, CONTROL) 221 222 KOVAPLUS_SYSFS_RW(info, INFO) 222 - KOVAPLUS_SYSFS_W(profile_settings, PROFILE_SETTINGS) 223 - KOVAPLUS_SYSFS_W(profile_buttons, PROFILE_BUTTONS) 223 + KOVAPLUS_SYSFS_RW(profile_settings, PROFILE_SETTINGS) 224 + KOVAPLUS_SYSFS_RW(profile_buttons, PROFILE_BUTTONS) 224 225 225 226 static ssize_t kovaplus_sysfs_read_profilex_settings(struct file *fp, 226 227 struct kobject *kobj, struct bin_attribute *attr, char *buf, ··· 370 369 }; 371 370 372 371 static struct bin_attribute kovaplus_bin_attributes[] = { 372 + KOVAPLUS_BIN_ATTRIBUTE_W(control, CONTROL), 373 373 KOVAPLUS_BIN_ATTRIBUTE_RW(info, INFO), 374 - KOVAPLUS_BIN_ATTRIBUTE_W(profile_settings, PROFILE_SETTINGS), 375 - KOVAPLUS_BIN_ATTRIBUTE_W(profile_buttons, PROFILE_BUTTONS), 374 + KOVAPLUS_BIN_ATTRIBUTE_RW(profile_settings, PROFILE_SETTINGS), 375 + KOVAPLUS_BIN_ATTRIBUTE_RW(profile_buttons, PROFILE_BUTTONS), 376 376 { 377 377 .attr = { .name = "profile1_settings", .mode = 0440 }, 378 378 .size = KOVAPLUS_SIZE_PROFILE_SETTINGS,
+2
drivers/hid/hid-roccat-kovaplus.h
··· 15 15 #include <linux/types.h> 16 16 17 17 enum { 18 + KOVAPLUS_SIZE_CONTROL = 0x03, 18 19 KOVAPLUS_SIZE_INFO = 0x06, 19 20 KOVAPLUS_SIZE_PROFILE_SETTINGS = 0x10, 20 21 KOVAPLUS_SIZE_PROFILE_BUTTONS = 0x17, ··· 62 61 63 62 enum kovaplus_commands { 64 63 KOVAPLUS_COMMAND_ACTUAL_PROFILE = 0x5, 64 + KOVAPLUS_COMMAND_CONTROL = 0x4, 65 65 KOVAPLUS_COMMAND_PROFILE_SETTINGS = 0x6, 66 66 KOVAPLUS_COMMAND_PROFILE_BUTTONS = 0x7, 67 67 KOVAPLUS_COMMAND_INFO = 0x9,