aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-29 09:53:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-29 09:53:42 -0400
commitca9280d1f82a7a0165a683dc09f182329ebec352 (patch)
tree201ebf8240be3cc1e423e6ed6a5001d729e0f739 /include/linux
parent13253d808d42dee88a53aa0fa57c5de4e6a460ed (diff)
parent7e87d11c9bda75816ced8d0895e8d24e5c52833a (diff)
Merge tag 'iio-for-4.13a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: First set of new device support, features and cleanups for IIO in the 4.13 cycle Two entirely new drivers in here plus the usual range of cleanups and features. New device support * ad5064 - add ltc2631, ltc2633 and ltc2635 support. * bma180 - trivial support for bma250e (new id) * hid-sensor-rotation - add relative orientation and geometric orientation support. * isl29028 - add isl29030 support (its effectively the same part from a driver point of view) * maxim_thermocouple - add max31856 id. * meson-saradc - add meson8b SoC adc support. * ti-adc084s021 - new driver and bindings. * ti-adc108s102 - new driver and bindings. Staging graduations * isl29028 Features * bma180 - ACPI enumeration for BMA250E which is used in various x86 tablets. * hi8453 - add raw access rather than only events. * hid-sensor-hub - Implement batch mode in which we can set a threshold on the amount of time between data coming from the fifos. This is the first device to do this rather than use a watershed on the number of samples. * hts221 - power management support * lsm6dsx - add system power management support. * rpr0521 - sampling frequency read / write * stm32-trigger - add support for TRG02 triggers. * tsl2583 - runtime power management support. Cleanups * core - inkern: fix a double unlock in iio_read_available_channel_raw when raw value doesn't appear to be raw (error path). - fixup accidental sizeof pointer in iio_device_add_mask_type. * docs - fix an accidental duplicated line in sysfs-bus-iio-meas-spec. * tools - use local include/uapi headers to ensure always up to date. - increase length of allowed trigger names. * ad9834 - symbolic to octal permissions. * ade7753 - symbolic to octal permissions. - fix indentation * ade7754 - symbolic to octal permissions. * ade7758 - symbolic to octal permissions. - ade7854 - symbolic to octal permissions. * as3935 - move out of storm check to given consistent results for raw and processed values. * bmp280 - fix bme280 naming in Kconfig help. * hi8435 - avoid garbage on event after enable. - add missing in_voltage_sensing_mode_available to list possible enum options. - handle the reset gpio with the obvious polarity rather than relying on DT to provide it correctly. * hid-sensors - fix a wrong error path scrubbing of return values. * hid-sensors-accel - drop static on a local variable * hid-sensors-rotation - Add missing scale and offset property parsing support. * ina2xx - Fix a bad use of GENMASK and some typos and whitespace issues. * isl29018 - only declare the ACPI table when ACPI is enabled. * isl29028 - fix proximity sleep times. * lsm6dsx - replace ifdef CONFIG_PM with __maybe_unused to avoid the complexity of dealing with the various PM config variables. * meson-saradc - mark meson_sar_adc_data static and const. * rcar-gyroadc - derive the interface clock speed from the fck clock on the basis they are the same actual clock. - drop the now unused if clock from the bindings. * rpr0521 - disable sensor when marked as such rather than always enabling it. - poweroff if probe fails and we can talk to device. - make sure device powered off when it doesn't need to be on. - use sizeof rather than hardcoded size on value read. - whitespace fixup. - reorder channel numbers ready for buffered support which didn't quite make this pull request. * st-accel - fix platform data initialization to allow remove and reprobe. * st-pressure - fix platform data initialization to allow remove and reprobe. * tsl2x7x - S_IRUGO, S_IWUSR to octal values - rename driver for consistency with more recent drivers - drop FSF mailing address - replace DEVICE_ATTR macros with the shorter DEVICE_ATTR_RW form and relevant function renames. * zpa2326 - report an error for consistency with other error paths.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hid-sensor-hub.h5
-rw-r--r--include/linux/hid-sensor-ids.h5
-rw-r--r--include/linux/iio/timer/stm32-timer-trigger.h2
-rw-r--r--include/linux/mfd/stm32-timers.h2
4 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
index f32d7c392c1e..fc7aae64dcde 100644
--- a/include/linux/hid-sensor-hub.h
+++ b/include/linux/hid-sensor-hub.h
@@ -233,12 +233,14 @@ struct hid_sensor_common {
233 atomic_t user_requested_state; 233 atomic_t user_requested_state;
234 int poll_interval; 234 int poll_interval;
235 int raw_hystersis; 235 int raw_hystersis;
236 int latency_ms;
236 struct iio_trigger *trigger; 237 struct iio_trigger *trigger;
237 int timestamp_ns_scale; 238 int timestamp_ns_scale;
238 struct hid_sensor_hub_attribute_info poll; 239 struct hid_sensor_hub_attribute_info poll;
239 struct hid_sensor_hub_attribute_info report_state; 240 struct hid_sensor_hub_attribute_info report_state;
240 struct hid_sensor_hub_attribute_info power_state; 241 struct hid_sensor_hub_attribute_info power_state;
241 struct hid_sensor_hub_attribute_info sensitivity; 242 struct hid_sensor_hub_attribute_info sensitivity;
243 struct hid_sensor_hub_attribute_info report_latency;
242 struct work_struct work; 244 struct work_struct work;
243}; 245};
244 246
@@ -276,5 +278,8 @@ s32 hid_sensor_read_poll_value(struct hid_sensor_common *st);
276 278
277int64_t hid_sensor_convert_timestamp(struct hid_sensor_common *st, 279int64_t hid_sensor_convert_timestamp(struct hid_sensor_common *st,
278 int64_t raw_value); 280 int64_t raw_value);
281bool hid_sensor_batch_mode_supported(struct hid_sensor_common *st);
282int hid_sensor_set_report_latency(struct hid_sensor_common *st, int latency);
283int hid_sensor_get_report_latency(struct hid_sensor_common *st);
279 284
280#endif 285#endif
diff --git a/include/linux/hid-sensor-ids.h b/include/linux/hid-sensor-ids.h
index 761f86242473..76033e0420a7 100644
--- a/include/linux/hid-sensor-ids.h
+++ b/include/linux/hid-sensor-ids.h
@@ -90,6 +90,8 @@
90#define HID_USAGE_SENSOR_ORIENT_TILT_Z 0x200481 90#define HID_USAGE_SENSOR_ORIENT_TILT_Z 0x200481
91 91
92#define HID_USAGE_SENSOR_DEVICE_ORIENTATION 0x20008A 92#define HID_USAGE_SENSOR_DEVICE_ORIENTATION 0x20008A
93#define HID_USAGE_SENSOR_RELATIVE_ORIENTATION 0x20008E
94#define HID_USAGE_SENSOR_GEOMAGNETIC_ORIENTATION 0x2000C1
93#define HID_USAGE_SENSOR_ORIENT_ROTATION_MATRIX 0x200482 95#define HID_USAGE_SENSOR_ORIENT_ROTATION_MATRIX 0x200482
94#define HID_USAGE_SENSOR_ORIENT_QUATERNION 0x200483 96#define HID_USAGE_SENSOR_ORIENT_QUATERNION 0x200483
95#define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX 0x200484 97#define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX 0x200484
@@ -150,6 +152,9 @@
150#define HID_USAGE_SENSOR_PROP_REPORT_STATE 0x200316 152#define HID_USAGE_SENSOR_PROP_REPORT_STATE 0x200316
151#define HID_USAGE_SENSOR_PROY_POWER_STATE 0x200319 153#define HID_USAGE_SENSOR_PROY_POWER_STATE 0x200319
152 154
155/* Batch mode selectors */
156#define HID_USAGE_SENSOR_PROP_REPORT_LATENCY 0x20031B
157
153/* Per data field properties */ 158/* Per data field properties */
154#define HID_USAGE_SENSOR_DATA_MOD_NONE 0x00 159#define HID_USAGE_SENSOR_DATA_MOD_NONE 0x00
155#define HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS 0x1000 160#define HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS 0x1000
diff --git a/include/linux/iio/timer/stm32-timer-trigger.h b/include/linux/iio/timer/stm32-timer-trigger.h
index 55535aef2e6c..fa7d786ed99e 100644
--- a/include/linux/iio/timer/stm32-timer-trigger.h
+++ b/include/linux/iio/timer/stm32-timer-trigger.h
@@ -10,6 +10,7 @@
10#define _STM32_TIMER_TRIGGER_H_ 10#define _STM32_TIMER_TRIGGER_H_
11 11
12#define TIM1_TRGO "tim1_trgo" 12#define TIM1_TRGO "tim1_trgo"
13#define TIM1_TRGO2 "tim1_trgo2"
13#define TIM1_CH1 "tim1_ch1" 14#define TIM1_CH1 "tim1_ch1"
14#define TIM1_CH2 "tim1_ch2" 15#define TIM1_CH2 "tim1_ch2"
15#define TIM1_CH3 "tim1_ch3" 16#define TIM1_CH3 "tim1_ch3"
@@ -44,6 +45,7 @@
44#define TIM7_TRGO "tim7_trgo" 45#define TIM7_TRGO "tim7_trgo"
45 46
46#define TIM8_TRGO "tim8_trgo" 47#define TIM8_TRGO "tim8_trgo"
48#define TIM8_TRGO2 "tim8_trgo2"
47#define TIM8_CH1 "tim8_ch1" 49#define TIM8_CH1 "tim8_ch1"
48#define TIM8_CH2 "tim8_ch2" 50#define TIM8_CH2 "tim8_ch2"
49#define TIM8_CH3 "tim8_ch3" 51#define TIM8_CH3 "tim8_ch3"
diff --git a/include/linux/mfd/stm32-timers.h b/include/linux/mfd/stm32-timers.h
index 4a0abbc10ef6..ce7346e7f77a 100644
--- a/include/linux/mfd/stm32-timers.h
+++ b/include/linux/mfd/stm32-timers.h
@@ -34,6 +34,7 @@
34#define TIM_CR1_DIR BIT(4) /* Counter Direction */ 34#define TIM_CR1_DIR BIT(4) /* Counter Direction */
35#define TIM_CR1_ARPE BIT(7) /* Auto-reload Preload Ena */ 35#define TIM_CR1_ARPE BIT(7) /* Auto-reload Preload Ena */
36#define TIM_CR2_MMS (BIT(4) | BIT(5) | BIT(6)) /* Master mode selection */ 36#define TIM_CR2_MMS (BIT(4) | BIT(5) | BIT(6)) /* Master mode selection */
37#define TIM_CR2_MMS2 GENMASK(23, 20) /* Master mode selection 2 */
37#define TIM_SMCR_SMS (BIT(0) | BIT(1) | BIT(2)) /* Slave mode selection */ 38#define TIM_SMCR_SMS (BIT(0) | BIT(1) | BIT(2)) /* Slave mode selection */
38#define TIM_SMCR_TS (BIT(4) | BIT(5) | BIT(6)) /* Trigger selection */ 39#define TIM_SMCR_TS (BIT(4) | BIT(5) | BIT(6)) /* Trigger selection */
39#define TIM_DIER_UIE BIT(0) /* Update interrupt */ 40#define TIM_DIER_UIE BIT(0) /* Update interrupt */
@@ -60,6 +61,7 @@
60 61
61#define MAX_TIM_PSC 0xFFFF 62#define MAX_TIM_PSC 0xFFFF
62#define TIM_CR2_MMS_SHIFT 4 63#define TIM_CR2_MMS_SHIFT 4
64#define TIM_CR2_MMS2_SHIFT 20
63#define TIM_SMCR_TS_SHIFT 4 65#define TIM_SMCR_TS_SHIFT 4
64#define TIM_BDTR_BKF_MASK 0xF 66#define TIM_BDTR_BKF_MASK 0xF
65#define TIM_BDTR_BKF_SHIFT 16 67#define TIM_BDTR_BKF_SHIFT 16