hid: add usb hid driver for rockchip discrete vr device.
[firefly-linux-kernel-4.4.55.git] / drivers / hid / hid-rkvr.h
1 /*
2  * Copyright (c) 2016 ROCKCHIP, Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the Free
6  * Software Foundation; either version 2 of the License, or (at your option)
7  * any later version.
8  */
9 #ifndef __HID_RKVR_H
10 #define __HID_RKVR_H
11
12 enum tracker_message_type {
13         TrackerMessage_None              = 0,
14         TrackerMessage_Sensors           = 1,
15         TrackerMessage_Unknown           = 0x100,
16         TrackerMessage_SizeError         = 0x101,
17 };
18
19 #define DEBUG_SYS 1
20
21 #define DYNAMIC_LOAD_MPU6500 0
22
23 int rkvr_sensor_register_callback(int (*callback)(char *, size_t, void *), void *priv);
24
25 struct rkvr_iio_hw_device {
26         struct device *dev;
27         const char *name;
28         int is_open;
29         struct list_head l;
30         int (*open)(struct rkvr_iio_hw_device *hdev);
31         void (*close)(struct rkvr_iio_hw_device *hdev);
32         int (*power)(struct rkvr_iio_hw_device *hdev, int level);
33         int (*idle)(struct rkvr_iio_hw_device *hdev, int report, int idle, int reqtype);
34         int (*read)(struct rkvr_iio_hw_device *hdev, int reg, unsigned char *data, int len);
35         int (*write)(struct rkvr_iio_hw_device *hdev, int reg, unsigned char data);
36 };
37
38 #endif