blob: 9324b707d4cb033c48ee763baaccbc66b40f5125 [file] [log] [blame]
/**
* opt3001_buffer.c - Texas Instruments OPT3001 Light Sensor
*
* Copyright (c) 2015 Nest Labs, Inc.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 of the License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>
#include "opt3001.h"
int opt3001_allocate_ring(struct iio_dev *iio)
{
return iio_triggered_buffer_setup(iio, &iio_pollfunc_store_time,
&opt3001_trigger_handler, NULL);
}
void opt3001_deallocate_ring(struct iio_dev *iio)
{
iio_triggered_buffer_cleanup(iio);
}