input_set_drvdata(input_dev, hid); input_dev->event = hid->hidinput_input_event; input_dev->open = hidinput_open; input_dev->close = hidinput_close; input_dev->setkeycode = hidinput_setkeycode; input_dev->getkeycode = hidinput_getkeycode; input_dev->name = hid->name; input_dev...
struct hid_device *hid = input_get_drvdata(dev); return hid->hid_open(hid); } 很简单继续运行open 这个open操作为usbhid_open usbhid_open在/drivers/hid/usbhid/hid-core.c中 int usbhid_open(struct hid_device *hid) { struct usbhid_device *usbhid = hid->driver_data; int res; //增加...
unsigned int flags) { struct atkbd *atkbd = serio_get_drvdata(serio); struct input_dev *dev = atkbd->dev; unsigned int code = data; int scroll = 0, hscroll = 0, click = -1; int value; unsigned short keycode; dev_dbg(&serio->dev, "Received %02x flags %02x\n", data, flags);...
input_dev->relbit[0] |= BIT_MASK(REL_WHEEL); input_set_drvdata(input_dev, mouse); input_dev->open = usb_mouse_open; input_dev->close = usb_mouse_close; /*填充int urb基本数据;*/ usb_fill_int_urb(mouse->irq, dev, pipe, mouse->data, (maxp> 8 ? 8 : maxp) , usb_mouse_...
struct tps6507x_dev *tps6507x_dev = dev_get_drvdata(pdev->dev.parent); struct touchscreen_init_data *init_data; struct input_dev *input_dev; struct tps6507x_board *tps_board; int schd; //找到tps6507x platform data tps_board = (struct tps6507x_board *)tps6507x_dev->dev->platfo...
*/voidir_keydown(struct input_dev *dev,intscancode, u8 toggle){unsignedlongflags;structir_input_dev*ir=input_get_drvdata(dev);u32 keycode = ir_g_keycode_from_table(dev, scancode); spin_lock_irqsave(&ir->keylock, flags);input_event(dev, EV_MSC, MSC_SCAN, scancode);/* Repeat ev...
struct dwav_usb_mt *dwav_usb_mt = input_get_drvdata(input); int r;usb_kill_urb(dwav_usb_mt->irq);r = usb_autopm_get_interface(dwav_usb_mt->interface);dwav_usb_mt->interface->needs_remote_wakeup = 0; if (!r) usb_autopm_put_interface(dwav_usb_mt->interface); ...
= NULL) kfree(stsbuf); spin_unlock_irqrestore(&vi->lock, flags); } static int virtinput_status(struct input_dev *idev, unsigned int type, unsigned int code, int value) { struct virtio_input *vi = input_get_drvdata(idev); return virtinput_send_status(vi, type, code, value); }...
adc = platform_get_drvdata(pdev); del_timer_sync(&adc->timer); free_irq(adc->irq, adc); s3c_adc_exit(adc); //clock的反操作 clk_disable(adc->clk); clk_put(adc->clk); input_free_device(adc->dev); iounmap(adc->v);
input_set_abs_params(dev, ABS_Z, ABSMIN_2G, ABSMAX_2G, 0, 0); input_set_drvdata(dev, bma150); err = input_register_device(dev); if (err < 0) { input_free_device(dev); return err; } bma150->input = dev; return 0; } 据说...