#include <linux/clk.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#define VF610_DACx_STATCTRL …
#define VF610_DAC_DACEN …
#define VF610_DAC_DACRFS …
#define VF610_DAC_LPEN …
#define VF610_DAC_DAT0(x) …
enum vf610_conversion_mode_sel { … };
struct vf610_dac { … };
static void vf610_dac_init(struct vf610_dac *info)
{ … }
static void vf610_dac_exit(struct vf610_dac *info)
{ … }
static int vf610_set_conversion_mode(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan,
unsigned int mode)
{ … }
static int vf610_get_conversion_mode(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan)
{ … }
static const char * const vf610_conv_modes[] = …;
static const struct iio_enum vf610_conversion_mode = …;
static const struct iio_chan_spec_ext_info vf610_ext_info[] = …;
#define VF610_DAC_CHAN(_chan_type) …
static const struct iio_chan_spec vf610_dac_iio_channels[] = …;
static int vf610_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2,
long mask)
{ … }
static int vf610_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2,
long mask)
{ … }
static const struct iio_info vf610_dac_iio_info = …;
static const struct of_device_id vf610_dac_match[] = …;
MODULE_DEVICE_TABLE(of, vf610_dac_match);
static int vf610_dac_probe(struct platform_device *pdev)
{ … }
static void vf610_dac_remove(struct platform_device *pdev)
{ … }
static int vf610_dac_suspend(struct device *dev)
{ … }
static int vf610_dac_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(vf610_dac_pm_ops, vf610_dac_suspend,
vf610_dac_resume);
static struct platform_driver vf610_dac_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;