linux/drivers/iio/dac/max5821.c

// SPDX-License-Identifier: GPL-2.0-only
 /*
  * iio/dac/max5821.c
  * Copyright (C) 2014 Philippe Reynes
  */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/iio/iio.h>
#include <linux/regulator/consumer.h>

#define MAX5821_MAX_DAC_CHANNELS

/* command bytes */
#define MAX5821_LOAD_DAC_A_IN_REG_B
#define MAX5821_LOAD_DAC_B_IN_REG_A
#define MAX5821_EXTENDED_COMMAND_MODE
#define MAX5821_READ_DAC_A_COMMAND
#define MAX5821_READ_DAC_B_COMMAND

#define MAX5821_EXTENDED_POWER_UP
#define MAX5821_EXTENDED_POWER_DOWN_MODE0
#define MAX5821_EXTENDED_POWER_DOWN_MODE1
#define MAX5821_EXTENDED_POWER_DOWN_MODE2
#define MAX5821_EXTENDED_DAC_A
#define MAX5821_EXTENDED_DAC_B

enum max5821_device_ids {};

struct max5821_data {};

static const char * const max5821_powerdown_modes[] =;

enum {};

static int max5821_get_powerdown_mode(struct iio_dev *indio_dev,
				      const struct iio_chan_spec *chan)
{}

static int max5821_set_powerdown_mode(struct iio_dev *indio_dev,
				      const struct iio_chan_spec *chan,
				      unsigned int mode)
{}

static const struct iio_enum max5821_powerdown_mode_enum =;

static ssize_t max5821_read_dac_powerdown(struct iio_dev *indio_dev,
					  uintptr_t private,
					  const struct iio_chan_spec *chan,
					  char *buf)
{}

static int max5821_sync_powerdown_mode(struct max5821_data *data,
				       const struct iio_chan_spec *chan)
{}

static ssize_t max5821_write_dac_powerdown(struct iio_dev *indio_dev,
					   uintptr_t private,
					   const struct iio_chan_spec *chan,
					   const char *buf, size_t len)
{}

static const struct iio_chan_spec_ext_info max5821_ext_info[] =;

#define MAX5821_CHANNEL(chan)

static const struct iio_chan_spec max5821_channels[] =;

static const u8 max5821_read_dac_command[] =;

static const u8 max5821_load_dac_command[] =;

static int max5821_get_value(struct iio_dev *indio_dev,
			     int *val, int channel)
{}

static int max5821_set_value(struct iio_dev *indio_dev,
			     int val, int channel)
{}

static int max5821_read_raw(struct iio_dev *indio_dev,
			   struct iio_chan_spec const *chan,
			   int *val, int *val2, long mask)
{}

static int max5821_write_raw(struct iio_dev *indio_dev,
			     struct iio_chan_spec const *chan,
			     int val, int val2, long mask)
{}

static int max5821_suspend(struct device *dev)
{}

static int max5821_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(max5821_pm_ops, max5821_suspend,
				max5821_resume);

static const struct iio_info max5821_info =;

static void max5821_regulator_disable(void *reg)
{}

static int max5821_probe(struct i2c_client *client)
{}

static const struct i2c_device_id max5821_id[] =;
MODULE_DEVICE_TABLE(i2c, max5821_id);

static const struct of_device_id max5821_of_match[] =;
MODULE_DEVICE_TABLE(of, max5821_of_match);

static struct i2c_driver max5821_driver =;
module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();