aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
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