Lines Matching +full:control +full:- +full:parent
1 // SPDX-License-Identifier: GPL-2.0-or-later
14 #include "hid-roccat-common.h"
29 return -ENOMEM; in roccat_common2_receive()
39 return ((len < 0) ? len : ((len != size) ? -EIO : 0)); in roccat_common2_receive()
51 return -ENOMEM; in roccat_common2_send()
60 return ((len < 0) ? len : ((len != size) ? -EIO : 0)); in roccat_common2_send()
75 struct roccat_common2_control control; in roccat_common2_receive_control_status() local
81 &control, sizeof(struct roccat_common2_control)); in roccat_common2_receive_control_status()
86 switch (control.value) { in roccat_common2_receive_control_status()
95 return -EINVAL; in roccat_common2_receive_control_status()
97 dev_err(&usb_dev->dev, in roccat_common2_receive_control_status()
100 control.value); in roccat_common2_receive_control_status()
101 return -EINVAL; in roccat_common2_receive_control_status()
125 mutex_init(&dev->lock); in roccat_common2_device_init_struct()
134 struct device *dev = kobj_to_dev(kobj)->parent->parent; in roccat_common2_sysfs_read()
143 return -EINVAL; in roccat_common2_sysfs_read()
145 mutex_lock(&roccat_dev->lock); in roccat_common2_sysfs_read()
147 mutex_unlock(&roccat_dev->lock); in roccat_common2_sysfs_read()
157 struct device *dev = kobj_to_dev(kobj)->parent->parent; in roccat_common2_sysfs_write()
163 return -EINVAL; in roccat_common2_sysfs_write()
165 mutex_lock(&roccat_dev->lock); in roccat_common2_sysfs_write()
167 mutex_unlock(&roccat_dev->lock); in roccat_common2_sysfs_write()