#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/iio/consumer.h>
#include <linux/iio/types.h>
struct iio_hwmon_state { … };
static ssize_t iio_hwmon_read_label(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t iio_hwmon_read_val(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static int iio_hwmon_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id iio_hwmon_of_match[] = …;
MODULE_DEVICE_TABLE(of, iio_hwmon_of_match);
static struct platform_driver iio_hwmon_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;