linux/drivers/iio/dac/mcp4725.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * mcp4725.c - Support for Microchip MCP4725/6
 *
 * Copyright (C) 2012 Peter Meerwald <[email protected]>
 *
 * Based on max517 by Roland Stigge <[email protected]>
 *
 * driver for the Microchip I2C 12-bit digital-to-analog converter (DAC)
 * (7-bit I2C slave address 0x60, the three LSBs can be configured in
 * hardware)
 */

#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/regulator/consumer.h>
#include <linux/mod_devicetable.h>
#include <linux/property.h>

#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>

#include <linux/iio/dac/mcp4725.h>

#define MCP4725_DRV_NAME

#define MCP472X_REF_VDD
#define MCP472X_REF_VREF_UNBUFFERED
#define MCP472X_REF_VREF_BUFFERED

struct mcp4725_chip_info {};

struct mcp4725_data {};

static int mcp4725_suspend(struct device *dev)
{}

static int mcp4725_resume(struct device *dev)
{}
static DEFINE_SIMPLE_DEV_PM_OPS(mcp4725_pm_ops, mcp4725_suspend,
				mcp4725_resume);

static ssize_t mcp4725_store_eeprom(struct device *dev,
	struct device_attribute *attr, const char *buf, size_t len)
{}

static IIO_DEVICE_ATTR(store_eeprom, S_IWUSR, NULL, mcp4725_store_eeprom, 0);

static struct attribute *mcp4725_attributes[] =;

static const struct attribute_group mcp4725_attribute_group =;

static const char * const mcp4725_powerdown_modes[] =;

static const char * const mcp4726_powerdown_modes[] =;

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

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

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

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

enum chip_id {};

static const struct iio_enum mcp472x_powerdown_mode_enum[] =;

static const struct iio_chan_spec_ext_info mcp4725_ext_info[] =;

static const struct iio_chan_spec_ext_info mcp4726_ext_info[] =;

static const struct iio_chan_spec mcp472x_channel[] =;

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

static int mcp4726_set_cfg(struct iio_dev *indio_dev)
{}

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

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

static const struct iio_info mcp4725_info =;

static int mcp4725_probe_dt(struct device *dev,
			    struct mcp4725_platform_data *pdata)
{}

static int mcp4725_probe(struct i2c_client *client)
{}

static void mcp4725_remove(struct i2c_client *client)
{}

static const struct mcp4725_chip_info mcp4725 =;

static const struct mcp4725_chip_info mcp4726 =;

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

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

static struct i2c_driver mcp4725_driver =;
module_i2c_driver();

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