Lines Matching defs:dev

153  * @dev: the input device for which events should be reported.
2069 static int hidpp_ff_upload_effect(struct input_dev *dev, struct ff_effect *effect, struct ff_effect *old)
2071 struct hidpp_ff_private_data *data = dev->ff->private;
2215 static int hidpp_ff_playback(struct input_dev *dev, int effect_id, int value)
2217 struct hidpp_ff_private_data *data = dev->ff->private;
2227 static int hidpp_ff_erase_effect(struct input_dev *dev, int effect_id)
2229 struct hidpp_ff_private_data *data = dev->ff->private;
2237 static void hidpp_ff_set_autocenter(struct input_dev *dev, u16 magnitude)
2239 struct hidpp_ff_private_data *data = dev->ff->private;
2259 static void hidpp_ff_set_gain(struct input_dev *dev, u16 gain)
2261 struct hidpp_ff_private_data *data = dev->ff->private;
2274 static ssize_t hidpp_ff_range_show(struct device *dev, struct device_attribute *attr, char *buf)
2276 struct hid_device *hid = to_hid_device(dev);
2284 static ssize_t hidpp_ff_range_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
2286 struct hid_device *hid = to_hid_device(dev);
2312 device_remove_file(&hid->dev, &dev_attr_range);
2322 struct input_dev *dev;
2334 dev = hidinput->input;
2336 if (!dev) {
2346 set_bit(hidpp_ff_effects[j], dev->ffbit);
2349 set_bit(hidpp_ff_effects_v2[j], dev->ffbit);
2351 error = input_ff_create(dev, num_slots);
2354 hid_err(dev, "Failed to create FF device!\n");
2381 ff = dev->ff;
2392 error = device_create_file(&(hidpp->hid_dev->dev), &dev_attr_range);
2623 wd = devm_kzalloc(&hdev->dev, sizeof(struct wtp_data),
2880 k400 = devm_kzalloc(&hdev->dev, sizeof(struct k400_private_data),
3507 battery_props = devm_kmemdup(&hidpp->hid_dev->dev,
3539 battery->ps = devm_power_supply_register(&hidpp->hid_dev->dev,
3545 power_supply_powers(battery->ps, &hidpp->hid_dev->dev);
3570 static int hidpp_input_open(struct input_dev *dev)
3572 struct hid_device *hid = input_get_drvdata(dev);
3577 static void hidpp_input_close(struct input_dev *dev)
3579 struct hid_device *hid = input_get_drvdata(dev);
3586 struct input_dev *input_dev = devm_input_allocate_device(&hdev->dev);
3603 input_dev->dev.parent = &hdev->dev;
3678 devm_name = devm_kasprintf(&hdev->dev, GFP_KERNEL,
3814 hidpp = devm_kzalloc(&hdev->dev, sizeof(*hidpp), GFP_KERNEL);
3836 devm_kfree(&hdev->dev, hidpp);
3867 ret = sysfs_create_group(&hdev->dev.kobj, &ps_attribute_group);
3874 * hid subdrivers (hid-input, hidraw). This allows retrieving the dev's
3886 dev_err(&hdev->dev, "%s:hid_hw_open returned error:%d\n",
3954 sysfs_remove_group(&hdev->dev.kobj, &ps_attribute_group);
3967 sysfs_remove_group(&hdev->dev.kobj, &ps_attribute_group);