/* The industrial I/O core * * Copyright (c) 2008 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. * * Based on elements of hwmon and input subsystems. */#define pr_fmt(fmt) "iio-core: " fmt#include<linux/kernel.h>#include<linux/module.h>#include<linux/idr.h>#include<linux/kdev_t.h>#include<linux/err.h>#include<linux/device.h>#include<linux/fs.h>#include<linux/poll.h>#include<linux/sched.h>#include<linux/wait.h>#include<linux/cdev.h>#include<linux/slab.h>#include<linux/anon_inodes.h>#include<linux/debugfs.h>#include<linux/mutex.h>#include<linux/iio/iio.h>#include"iio_core.h"#include"iio_core_trigger.h"#include<linux/iio/sysfs.h>#include<linux/iio/events.h>#include<linux/iio/buffer.h>/* IDA to assign each registered device a unique id */staticDEFINE_IDA(iio_ida);staticdev_tiio_devt;#define IIO_DEV_MAX 256structbus_typeiio_bus_type={