#include <sys/socket.h>
#include <utils/Log.h>
#include <hardware/sensors.h>
-#include <linux/iio/events.h>
+#include <linux/ioctl.h>
#include "control.h"
#include "enumeration.h"
#include "utils.h"
#include "description.h"
#include "filtering.h"
+/* Couple of temporary defines until we get a suitable linux/iio/events.h include */
+
+struct iio_event_data {
+ __u64 id;
+ __s64 timestamp;
+};
+
+#define IIO_GET_EVENT_FD_IOCTL _IOR('i', 0x90, int)
+
/* Currently active sensors count, per device */
static int poll_sensors_per_dev[MAX_DEVICES]; /* poll-mode sensors */
static int trig_sensors_per_dev[MAX_DEVICES]; /* trigger, event based */
ts = event.timestamp;
- ALOGV("Read event %ld from fd %d of iio device %d\n", event.id, fd, dev_num);
+ ALOGV("Read event %lld from fd %d of iio device %d\n", event.id, fd, dev_num);
/* Map device report to sensor reports */
for (s = 0; s < MAX_SENSORS; s++)