These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / iio / iio_simple_dummy.h
index 34989bf..b9069a1 100644 (file)
@@ -25,7 +25,7 @@ struct iio_dummy_regs;
  * @accel_calibscale:          cache for acceleration calibscale
  * @lock:                      lock to ensure state is consistent
  * @event_irq:                 irq number for event line (faked)
- * @event_val:                 cache for event theshold value
+ * @event_val:                 cache for event threshold value
  * @event_en:                  cache of whether event is enabled
  */
 struct iio_dummy_state {
@@ -46,6 +46,7 @@ struct iio_dummy_state {
        int event_irq;
        int event_val;
        bool event_en;
+       s64 event_timestamp;
 #endif /* CONFIG_IIO_SIMPLE_DUMMY_EVENTS */
 };
 
@@ -79,7 +80,7 @@ int iio_simple_dummy_write_event_value(struct iio_dev *indio_dev,
                                       int val2);
 
 int iio_simple_dummy_events_register(struct iio_dev *indio_dev);
-int iio_simple_dummy_events_unregister(struct iio_dev *indio_dev);
+void iio_simple_dummy_events_unregister(struct iio_dev *indio_dev);
 
 #else /* Stubs for when events are disabled at compile time */
 
@@ -89,28 +90,26 @@ iio_simple_dummy_events_register(struct iio_dev *indio_dev)
        return 0;
 };
 
-static inline int
+static inline void
 iio_simple_dummy_events_unregister(struct iio_dev *indio_dev)
-{
-       return 0;
-};
+{ };
 
 #endif /* CONFIG_IIO_SIMPLE_DUMMY_EVENTS*/
 
 /**
  * enum iio_simple_dummy_scan_elements - scan index enum
- * @voltage0:          the single ended voltage channel
- * @diffvoltage1m2:    first differential channel
- * @diffvoltage3m4:    second differenial channel
- * @accelx:            acceleration channel
+ * @DUMMY_INDEX_VOLTAGE_0:         the single ended voltage channel
+ * @DUMMY_INDEX_DIFFVOLTAGE_1M2:   first differential channel
+ * @DUMMY_INDEX_DIFFVOLTAGE_3M4:   second differential channel
+ * @DUMMY_INDEX_ACCELX:            acceleration channel
  *
  * Enum provides convenient numbering for the scan index.
  */
 enum iio_simple_dummy_scan_elements {
-       voltage0,
-       diffvoltage1m2,
-       diffvoltage3m4,
-       accelx,
+       DUMMY_INDEX_VOLTAGE_0,
+       DUMMY_INDEX_DIFFVOLTAGE_1M2,
+       DUMMY_INDEX_DIFFVOLTAGE_3M4,
+       DUMMY_INDEX_ACCELX,
 };
 
 #ifdef CONFIG_IIO_SIMPLE_DUMMY_BUFFER
@@ -121,6 +120,7 @@ static inline int iio_simple_dummy_configure_buffer(struct iio_dev *indio_dev)
 {
        return 0;
 };
+
 static inline
 void iio_simple_dummy_unconfigure_buffer(struct iio_dev *indio_dev)
 {};