diff options
author | Alexander Holler <holler@ahsoftware.de> | 2012-12-15 07:45:00 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-01-06 06:43:37 -0500 |
commit | 2974cdf293e1cb00860522624252aeaba502c8bf (patch) | |
tree | 76783b35540b56a470baece11fb3f80d6f9d1518 /drivers/iio | |
parent | 8e3cdca26c9d9f0936c555bc67e2a5d71e61bb0d (diff) |
iio: merge hid-sensor-attributes.h into hid-sensor-hub.h
The stuff in hid-sensor-attributes.h is needed by every piece which
uses hid-sensor-hub and merging it into hid-sensor-hub.h makes it accessible
from outside the iio subdirectory.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/accel/hid-sensor-accel-3d.c | 1 | ||||
-rw-r--r-- | drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 1 | ||||
-rw-r--r-- | drivers/iio/common/hid-sensors/hid-sensor-attributes.h | 57 | ||||
-rw-r--r-- | drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 1 | ||||
-rw-r--r-- | drivers/iio/gyro/hid-sensor-gyro-3d.c | 1 | ||||
-rw-r--r-- | drivers/iio/light/hid-sensor-als.c | 1 | ||||
-rw-r--r-- | drivers/iio/magnetometer/hid-sensor-magn-3d.c | 1 |
7 files changed, 0 insertions, 63 deletions
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c index e67bb912bd19..268ca3a1030e 100644 --- a/drivers/iio/accel/hid-sensor-accel-3d.c +++ b/drivers/iio/accel/hid-sensor-accel-3d.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/iio/buffer.h> | 28 | #include <linux/iio/buffer.h> |
29 | #include <linux/iio/trigger_consumer.h> | 29 | #include <linux/iio/trigger_consumer.h> |
30 | #include <linux/iio/triggered_buffer.h> | 30 | #include <linux/iio/triggered_buffer.h> |
31 | #include "../common/hid-sensors/hid-sensor-attributes.h" | ||
32 | #include "../common/hid-sensors/hid-sensor-trigger.h" | 31 | #include "../common/hid-sensors/hid-sensor-trigger.h" |
33 | 32 | ||
34 | /*Format: HID-SENSOR-usage_id_in_hex*/ | 33 | /*Format: HID-SENSOR-usage_id_in_hex*/ |
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c index 75374955caba..5873f160bac9 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/hid-sensor-hub.h> | 25 | #include <linux/hid-sensor-hub.h> |
26 | #include <linux/iio/iio.h> | 26 | #include <linux/iio/iio.h> |
27 | #include <linux/iio/sysfs.h> | 27 | #include <linux/iio/sysfs.h> |
28 | #include "hid-sensor-attributes.h" | ||
29 | 28 | ||
30 | static int pow_10(unsigned power) | 29 | static int pow_10(unsigned power) |
31 | { | 30 | { |
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.h b/drivers/iio/common/hid-sensors/hid-sensor-attributes.h deleted file mode 100644 index a4676a0c3de5..000000000000 --- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
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_ATTRIBUTES_H | ||
20 | #define _HID_SENSORS_ATTRIBUTES_H | ||
21 | |||
22 | /* Common hid sensor iio structure */ | ||
23 | struct hid_sensor_iio_common { | ||
24 | struct hid_sensor_hub_device *hsdev; | ||
25 | struct platform_device *pdev; | ||
26 | unsigned usage_id; | ||
27 | bool data_ready; | ||
28 | struct hid_sensor_hub_attribute_info poll; | ||
29 | struct hid_sensor_hub_attribute_info report_state; | ||
30 | struct hid_sensor_hub_attribute_info power_state; | ||
31 | struct hid_sensor_hub_attribute_info sensitivity; | ||
32 | }; | ||
33 | |||
34 | /*Convert from hid unit expo to regular exponent*/ | ||
35 | static inline int hid_sensor_convert_exponent(int unit_expo) | ||
36 | { | ||
37 | if (unit_expo < 0x08) | ||
38 | return unit_expo; | ||
39 | else if (unit_expo <= 0x0f) | ||
40 | return -(0x0f-unit_expo+1); | ||
41 | else | ||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev, | ||
46 | u32 usage_id, | ||
47 | struct hid_sensor_iio_common *st); | ||
48 | int hid_sensor_write_raw_hyst_value(struct hid_sensor_iio_common *st, | ||
49 | int val1, int val2); | ||
50 | int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st, | ||
51 | int *val1, int *val2); | ||
52 | int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st, | ||
53 | int val1, int val2); | ||
54 | int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st, | ||
55 | int *val1, int *val2); | ||
56 | |||
57 | #endif | ||
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c index d60198a6ca29..7da73800dcdd 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/iio/iio.h> | 26 | #include <linux/iio/iio.h> |
27 | #include <linux/iio/trigger.h> | 27 | #include <linux/iio/trigger.h> |
28 | #include <linux/iio/sysfs.h> | 28 | #include <linux/iio/sysfs.h> |
29 | #include "hid-sensor-attributes.h" | ||
30 | #include "hid-sensor-trigger.h" | 29 | #include "hid-sensor-trigger.h" |
31 | 30 | ||
32 | static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig, | 31 | static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig, |
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c index 4c8b158e40e1..8d34ee4f33b1 100644 --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/iio/buffer.h> | 28 | #include <linux/iio/buffer.h> |
29 | #include <linux/iio/trigger_consumer.h> | 29 | #include <linux/iio/trigger_consumer.h> |
30 | #include <linux/iio/triggered_buffer.h> | 30 | #include <linux/iio/triggered_buffer.h> |
31 | #include "../common/hid-sensors/hid-sensor-attributes.h" | ||
32 | #include "../common/hid-sensors/hid-sensor-trigger.h" | 31 | #include "../common/hid-sensors/hid-sensor-trigger.h" |
33 | 32 | ||
34 | /*Format: HID-SENSOR-usage_id_in_hex*/ | 33 | /*Format: HID-SENSOR-usage_id_in_hex*/ |
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c index 23eeeef64e84..723f203269f2 100644 --- a/drivers/iio/light/hid-sensor-als.c +++ b/drivers/iio/light/hid-sensor-als.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/iio/buffer.h> | 28 | #include <linux/iio/buffer.h> |
29 | #include <linux/iio/trigger_consumer.h> | 29 | #include <linux/iio/trigger_consumer.h> |
30 | #include <linux/iio/triggered_buffer.h> | 30 | #include <linux/iio/triggered_buffer.h> |
31 | #include "../common/hid-sensors/hid-sensor-attributes.h" | ||
32 | #include "../common/hid-sensors/hid-sensor-trigger.h" | 31 | #include "../common/hid-sensors/hid-sensor-trigger.h" |
33 | 32 | ||
34 | /*Format: HID-SENSOR-usage_id_in_hex*/ | 33 | /*Format: HID-SENSOR-usage_id_in_hex*/ |
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index 8e75eb76ccd9..7811c0bdc95e 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/iio/buffer.h> | 28 | #include <linux/iio/buffer.h> |
29 | #include <linux/iio/trigger_consumer.h> | 29 | #include <linux/iio/trigger_consumer.h> |
30 | #include <linux/iio/triggered_buffer.h> | 30 | #include <linux/iio/triggered_buffer.h> |
31 | #include "../common/hid-sensors/hid-sensor-attributes.h" | ||
32 | #include "../common/hid-sensors/hid-sensor-trigger.h" | 31 | #include "../common/hid-sensors/hid-sensor-trigger.h" |
33 | 32 | ||
34 | /*Format: HID-SENSOR-usage_id_in_hex*/ | 33 | /*Format: HID-SENSOR-usage_id_in_hex*/ |