#include <linux/bitfield.h>
#include <linux/iio/iio.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/units.h>
#include <linux/mfd/max77541.h>
enum max77541_adc_range { … };
enum max77541_adc_channel { … };
static int max77541_adc_offset(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2)
{ … }
static int max77541_adc_scale(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2)
{ … }
static int max77541_adc_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val)
{ … }
#define MAX77541_ADC_CHANNEL_V(_channel, _name, _type, _reg) …
#define MAX77541_ADC_CHANNEL_TEMP(_channel, _name, _type, _reg) …
static const struct iio_chan_spec max77541_adc_channels[] = …;
static int max77541_adc_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static const struct iio_info max77541_adc_info = …;
static int max77541_adc_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id max77541_adc_platform_id[] = …;
MODULE_DEVICE_TABLE(platform, max77541_adc_platform_id);
static struct platform_driver max77541_adc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;