Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/sysfs.h>
#include "iio_dummy_evgen.h"
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
Go to the source code of this file.
Data Structures | |
struct | iio_dummy_eventgen |
Macros | |
#define | IIO_EVENTGEN_NO 10 |
Functions | |
int | iio_dummy_evgen_get_irq (void) |
EXPORT_SYMBOL_GPL (iio_dummy_evgen_get_irq) | |
int | iio_dummy_evgen_release_irq (int irq) |
EXPORT_SYMBOL_GPL (iio_dummy_evgen_release_irq) | |
module_init (iio_dummy_evgen_init) | |
module_exit (iio_dummy_evgen_exit) | |
MODULE_AUTHOR ("Jonathan Cameron <[email protected]>") | |
MODULE_DESCRIPTION ("IIO dummy driver") | |
MODULE_LICENSE ("GPL v2") | |
#define IIO_EVENTGEN_NO 10 |
Copyright (c) 2011 Jonathan Cameron
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
Companion module to the iio simple dummy example driver. The purpose of this is to generate 'fake' event interrupts thus allowing that driver's code to be as close as possible to that of a normal driver talking to hardware. The approach used here is not intended to be general and just happens to work for this particular use case.
Definition at line 29 of file iio_dummy_evgen.c.
EXPORT_SYMBOL_GPL | ( | iio_dummy_evgen_get_irq | ) |
EXPORT_SYMBOL_GPL | ( | iio_dummy_evgen_release_irq | ) |
iio_dummy_evgen_get_irq() - get an evgen provided irq for a device
This function will give a free allocated irq to a client device. That irq can then be caused to 'fire' by using the associated sysfs file.
Definition at line 102 of file iio_dummy_evgen.c.
iio_dummy_evgen_release_irq() - give the irq back. : irq being returned to the pool
Used by client driver instances to give the irqs back when they disconnect
Definition at line 129 of file iio_dummy_evgen.c.
MODULE_AUTHOR | ( | "Jonathan Cameron <[email protected]>" | ) |
module_exit | ( | iio_dummy_evgen_exit | ) |
module_init | ( | iio_dummy_evgen_init | ) |
MODULE_LICENSE | ( | "GPL v2" | ) |