Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hid-sensor-hub.h
Go to the documentation of this file.
1 /*
2  * HID Sensors Driver
3  * Copyright (c) 2012, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17  *
18  */
19 #ifndef _HID_SENSORS_HUB_H
20 #define _HID_SENSORS_HUB_H
21 
22 #include <linux/hid.h>
23 #include <linux/hid-sensor-ids.h>
24 
43 };
44 
52  struct hid_device *hdev;
55 };
56 
68  int (*suspend)(struct hid_sensor_hub_device *hsdev, void *priv);
69  int (*resume)(struct hid_sensor_hub_device *hsdev, void *priv);
71  u32 usage_id, size_t raw_len, char *raw_data,
72  void *priv);
73  int (*send_event)(struct hid_sensor_hub_device *hsdev, u32 usage_id,
74  void *priv);
75 };
76 
77 /* Registration functions */
78 
90  u32 usage_id,
91  struct hid_sensor_hub_callbacks *usage_callback);
92 
102  u32 usage_id);
103 
104 
105 /* Hid sensor hub core interfaces */
106 
119  u8 type,
120  u32 usage_id, u32 attr_usage_id,
122 
135  u32 usage_id,
136  u32 attr_usage_id, u32 report_id);
146 int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
147  u32 field_index, s32 value);
148 
158 int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
159  u32 field_index, s32 *value);
160 #endif