linux/drivers/iio/dac/mcp4922.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * mcp4922.c
 *
 * Driver for Microchip Digital to Analog Converters.
 * Supports MCP4902, MCP4912, and MCP4922.
 *
 * Copyright (c) 2014 EMAC Inc.
 */

#include <linux/module.h>
#include <linux/init.h>
#include <linux/spi/spi.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/regulator/consumer.h>
#include <linux/bitops.h>

#define MCP4922_NUM_CHANNELS
#define MCP4921_NUM_CHANNELS

enum mcp4922_supported_device_ids {};

struct mcp4922_state {};

#define MCP4922_CHAN(chan, bits)

static int mcp4922_spi_write(struct mcp4922_state *state, u8 addr, u32 val)
{}

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

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

static const struct iio_chan_spec mcp4922_channels[4][MCP4922_NUM_CHANNELS] =;

static const struct iio_info mcp4922_info =;

static int mcp4922_probe(struct spi_device *spi)
{}

static void mcp4922_remove(struct spi_device *spi)
{}

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

static struct spi_driver mcp4922_driver =;
module_spi_driver();

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