linux/drivers/iio/dac/ti-dac082s085.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * ti-dac082s085.c - Texas Instruments 8/10/12-bit 2/4-channel DAC driver
 *
 * Copyright (C) 2017 KUNBUS GmbH
 *
 * https://www.ti.com/lit/ds/symlink/dac082s085.pdf
 * https://www.ti.com/lit/ds/symlink/dac102s085.pdf
 * https://www.ti.com/lit/ds/symlink/dac122s085.pdf
 * https://www.ti.com/lit/ds/symlink/dac084s085.pdf
 * https://www.ti.com/lit/ds/symlink/dac104s085.pdf
 * https://www.ti.com/lit/ds/symlink/dac124s085.pdf
 */

#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>

enum {};

struct ti_dac_spec {};

static const struct ti_dac_spec ti_dac_spec[] =;

/**
 * struct ti_dac_chip - TI DAC chip
 * @lock: protects write sequences
 * @vref: regulator generating Vref
 * @mesg: SPI message to perform a write
 * @xfer: SPI transfer used by @mesg
 * @val: cached value of each output
 * @powerdown: whether the chip is powered down
 * @powerdown_mode: selected by the user
 * @resolution: resolution of the chip
 * @buf: buffer for @xfer
 */
struct ti_dac_chip {};

#define WRITE_NOT_UPDATE(chan)
#define WRITE_AND_UPDATE(chan)
#define WRITE_ALL_UPDATE
#define POWERDOWN(mode)

static int ti_dac_cmd(struct ti_dac_chip *ti_dac, u8 cmd, u16 val)
{}

static const char * const ti_dac_powerdown_modes[] =;

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

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

static const struct iio_enum ti_dac_powerdown_mode =;

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

static ssize_t ti_dac_write_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 ti_dac_ext_info[] =;

#define TI_DAC_CHANNEL(chan)

static const struct iio_chan_spec ti_dac_channels[] =;

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

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

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

static const struct iio_info ti_dac_info =;

static int ti_dac_probe(struct spi_device *spi)
{}

static void ti_dac_remove(struct spi_device *spi)
{}

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

static const struct spi_device_id ti_dac_spi_id[] =;
MODULE_DEVICE_TABLE(spi, ti_dac_spi_id);

static struct spi_driver ti_dac_driver =;
module_spi_driver();

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