cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

triggered_buffer.h (1302B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef _LINUX_IIO_TRIGGERED_BUFFER_H_
      3#define _LINUX_IIO_TRIGGERED_BUFFER_H_
      4
      5#include <linux/iio/buffer.h>
      6#include <linux/interrupt.h>
      7
      8struct attribute;
      9struct iio_dev;
     10struct iio_buffer_setup_ops;
     11
     12int iio_triggered_buffer_setup_ext(struct iio_dev *indio_dev,
     13	irqreturn_t (*h)(int irq, void *p),
     14	irqreturn_t (*thread)(int irq, void *p),
     15	enum iio_buffer_direction direction,
     16	const struct iio_buffer_setup_ops *setup_ops,
     17	const struct attribute **buffer_attrs);
     18void iio_triggered_buffer_cleanup(struct iio_dev *indio_dev);
     19
     20#define iio_triggered_buffer_setup(indio_dev, h, thread, setup_ops)		\
     21	iio_triggered_buffer_setup_ext((indio_dev), (h), (thread),		\
     22					IIO_BUFFER_DIRECTION_IN, (setup_ops),	\
     23					NULL)
     24
     25int devm_iio_triggered_buffer_setup_ext(struct device *dev,
     26					struct iio_dev *indio_dev,
     27					irqreturn_t (*h)(int irq, void *p),
     28					irqreturn_t (*thread)(int irq, void *p),
     29					enum iio_buffer_direction direction,
     30					const struct iio_buffer_setup_ops *ops,
     31					const struct attribute **buffer_attrs);
     32
     33#define devm_iio_triggered_buffer_setup(dev, indio_dev, h, thread, setup_ops)	\
     34	devm_iio_triggered_buffer_setup_ext((dev), (indio_dev), (h), (thread),	\
     35					    IIO_BUFFER_DIRECTION_IN,		\
     36					    (setup_ops), NULL)
     37
     38#endif