blob: 0483551c1fbc8158c28ffbda3c6956c37bbb85e0 [file] [log] [blame]
/**
* opt3001.h - 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.
*/
#ifndef OPT3001_H
#define OPT3001_H
#include <linux/iio/iio.h>
irqreturn_t opt3001_trigger_handler(int irq, void *p);
#ifdef CONFIG_OPT3001_BUFFER
int opt3001_allocate_ring(struct iio_dev *indio_dev);
void opt3001_deallocate_ring(struct iio_dev *indio_dev);
#else /* CONFIG_OPT3001_BUFFER */
static inline int opt3001_allocate_ring(struct iio_dev *iio)
{
return 0;
}
static inline void opt3001_deallocate_ring(struct iio_dev *iio)
{
}
#endif /* CONFIG_OPT3001_BUFFER */
#endif /* OPT3001_H */