static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
{
struct iio_buffer *buffer = indio_dev->buffer;
- s64 timestamp = iio_get_time_ns();
int datum_sz;
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
datum_sz);
return;
}
- iio_push_to_buffer(buffer, (u8 *)data, timestamp);
+ iio_push_to_buffer(buffer, (u8 *)data);
}
/* Callback handler to send event after all samples are received and captured */
if (ret == 0) {
if (indio_dev->scan_timestamp)
((s64 *)st->data)[1] = pf->timestamp;
- iio_push_to_buffer(buffer, (u8 *)st->data, pf->timestamp);
+ iio_push_to_buffer(buffer, (u8 *)st->data);
}
iio_trigger_notify_done(indio_dev->trig);
break;
}
- iio_push_to_buffer(indio_dev->buffer, (uint8_t *)data, pf->timestamp);
+ iio_push_to_buffer(indio_dev->buffer, (uint8_t *)data);
iio_trigger_notify_done(indio_dev->trig);
sigma_delta->irq_dis = false;
*timestamp = pf->timestamp;
}
- buffer->access->store_to(buffer, (u8 *)st->buffer, pf->timestamp);
+ buffer->access->store_to(buffer, (u8 *)st->buffer);
iio_trigger_notify_done(idev->trig);
st->irq_enabled = true;
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
{
struct iio_buffer *buffer = indio_dev->buffer;
- s64 timestamp = iio_get_time_ns();
int datum_sz;
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
datum_sz);
return;
}
- iio_push_to_buffer(buffer, (u8 *)data, timestamp);
+ iio_push_to_buffer(buffer, (u8 *)data);
}
/* Callback handler to send event after all samples are received and captured */
return buffer->demux_bounce;
}
-int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data,
- s64 timestamp)
+int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data)
{
unsigned char *dataout = iio_demux(buffer, data);
- return buffer->access->store_to(buffer, dataout, timestamp);
+ return buffer->access->store_to(buffer, dataout);
}
EXPORT_SYMBOL_GPL(iio_push_to_buffer);
}
static int iio_store_to_kfifo(struct iio_buffer *r,
- u8 *data,
- s64 timestamp)
+ u8 *data)
{
int ret;
struct iio_kfifo *kf = iio_to_kfifo(r);
if (indio_dev->scan_timestamp)
*(s64 *)((u8 *)data->buffer + ALIGN(len, sizeof(s64)))
= time_ns;
- iio_push_to_buffer(buffer, (u8 *)data->buffer, time_ns);
+ iio_push_to_buffer(buffer, (u8 *)data->buffer);
done:
iio_trigger_notify_done(indio_dev->trig);
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
{
struct iio_buffer *buffer = indio_dev->buffer;
- s64 timestamp = iio_get_time_ns();
int datum_sz;
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
datum_sz);
return;
}
- iio_push_to_buffer(buffer, (u8 *)data, timestamp);
+ iio_push_to_buffer(buffer, (u8 *)data);
}
/* Callback handler to send event after all samples are received and captured */
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
{
struct iio_buffer *buffer = indio_dev->buffer;
- s64 timestamp = iio_get_time_ns();
int datum_sz;
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
datum_sz);
return;
}
- iio_push_to_buffer(buffer, (u8 *)data, timestamp);
+ iio_push_to_buffer(buffer, (u8 *)data);
}
/* Callback handler to send event after all samples are received and captured */
if (indio_dev->scan_timestamp)
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
- iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
+ iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
kfree(data);
done:
if (indio_dev->scan_timestamp)
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
- iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
+ iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
kfree(data);
done:
if (indio_dev->scan_timestamp)
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
- iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
+ iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
kfree(data);
done:
if (indio_dev->scan_timestamp)
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
- iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
+ iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
kfree(data);
done:
if (indio_dev->scan_timestamp)
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
- iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
+ iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
kfree(data);
done:
if (indio_dev->scan_timestamp)
*(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
= pf->timestamp;
- iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
+ iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
kfree(data);
done:
indio_dev->masklength); i++)
buf[i] = be16_to_cpu(st->rx_buf[i]);
- iio_push_to_buffer(indio_dev->buffer, (u8 *)buf, time_ns);
+ iio_push_to_buffer(indio_dev->buffer, (u8 *)buf);
done:
iio_trigger_notify_done(indio_dev->trig);
memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64),
&time_ns, sizeof(time_ns));
- iio_push_to_buffer(indio_dev->buffer, rxbuf, time_ns);
+ iio_push_to_buffer(indio_dev->buffer, rxbuf);
done:
iio_trigger_notify_done(indio_dev->trig);
kfree(rxbuf);
if (indio_dev->scan_timestamp)
*((s64 *)(buf + indio_dev->scan_bytes - sizeof(s64))) = time_ns;
- iio_push_to_buffer(indio_dev->buffer, buf, time_ns);
+ iio_push_to_buffer(indio_dev->buffer, buf);
done:
gpio_set_value(st->pdata->gpio_convst, 0);
iio_trigger_notify_done(indio_dev->trig);
memcpy(buf + indio_dev->scan_bytes - sizeof(s64),
&time_ns, sizeof(time_ns));
- iio_push_to_buffer(indio_dev->buffer, buf, time_ns);
+ iio_push_to_buffer(indio_dev->buffer, buf);
done:
kfree(buf);
iio_trigger_notify_done(indio_dev->trig);
memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64),
&time_ns, sizeof(time_ns));
- iio_push_to_buffer(indio_dev->buffer, rxbuf, time_ns);
+ iio_push_to_buffer(indio_dev->buffer, rxbuf);
done:
kfree(rxbuf);
out:
if (indio_dev->scan_timestamp)
memcpy(rxbuf + d_size - sizeof(s64), &time_ns, sizeof(time_ns));
- iio_push_to_buffer(indio_dev->buffer, rxbuf, time_ns);
+ iio_push_to_buffer(indio_dev->buffer, rxbuf);
done_free:
kfree(rxbuf);
*timestamp = pf->timestamp;
}
- iio_push_to_buffer(buffer, (u8 *)lradc->buffer, pf->timestamp);
+ iio_push_to_buffer(buffer, (u8 *)lradc->buffer);
iio_trigger_notify_done(iio->trig);
if (indio_dev->scan_timestamp)
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
- iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
+ iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
kfree(data);
done:
if (indio_dev->scan_timestamp)
*(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
= iio_get_time_ns();
- iio_push_to_buffer(buffer, (u8 *)data, pf->timestamp);
+ iio_push_to_buffer(buffer, (u8 *)data);
kfree(data);
buf[0] = be16_to_cpu(buf[0]);
}
/* save datum to the ring */
- iio_push_to_buffer(ring, (u8 *)buf, iio_get_time_ns());
+ iio_push_to_buffer(ring, (u8 *)buf);
} else {
/* no data available - try again later */
schedule_delayed_work(&st->work, st->poll_time_jiffies);
/* Guaranteed to be aligned with 8 byte boundary */
if (ring->scan_timestamp)
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
- iio_push_to_buffer(ring, (u8 *) data, pf->timestamp);
+ iio_push_to_buffer(ring, (u8 *) data);
done:
kfree(data);
if (indio_dev->scan_timestamp)
dat64[1] = pf->timestamp;
- iio_push_to_buffer(indio_dev->buffer, (u8 *)dat64, pf->timestamp);
+ iio_push_to_buffer(indio_dev->buffer, (u8 *)dat64);
iio_trigger_notify_done(indio_dev->trig);
/* Lock always held if their is a chance this may be called */
/* Only one of these per ring may run concurrently - enforced by drivers */
static int iio_store_to_sw_ring(struct iio_sw_ring_buffer *ring,
- unsigned char *data, s64 timestamp)
+ unsigned char *data)
{
int ret = 0;
unsigned char *temp_ptr, *change_test_ptr;
}
static int iio_store_to_sw_rb(struct iio_buffer *r,
- u8 *data,
- s64 timestamp)
+ u8 *data)
{
struct iio_sw_ring_buffer *ring = iio_to_sw_ring(r);
- return iio_store_to_sw_ring(ring, data, timestamp);
+ return iio_store_to_sw_ring(ring, data);
}
static int iio_request_update_sw_rb(struct iio_buffer *r)
* any of them not existing.
**/
struct iio_buffer_access_funcs {
- int (*store_to)(struct iio_buffer *buffer, u8 *data, s64 timestamp);
+ int (*store_to)(struct iio_buffer *buffer, u8 *data);
int (*read_first_n)(struct iio_buffer *buffer,
size_t n,
char __user *buf);
* iio_push_to_buffer() - push to a registered buffer.
* @buffer: IIO buffer structure for device
* @data: the data to push to the buffer
- * @timestamp: timestamp to associate with the data
*/
-int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data,
- s64 timestamp);
+int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data);
int iio_update_demux(struct iio_dev *indio_dev);