xref: /linux/drivers/iio/dac/ti-dac082s085.c (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
261011264SLukas Wunner /*
361011264SLukas Wunner  * ti-dac082s085.c - Texas Instruments 8/10/12-bit 2/4-channel DAC driver
461011264SLukas Wunner  *
561011264SLukas Wunner  * Copyright (C) 2017 KUNBUS GmbH
661011264SLukas Wunner  *
73593cd53SAlexander A. Klimov  * https://www.ti.com/lit/ds/symlink/dac082s085.pdf
83593cd53SAlexander A. Klimov  * https://www.ti.com/lit/ds/symlink/dac102s085.pdf
93593cd53SAlexander A. Klimov  * https://www.ti.com/lit/ds/symlink/dac122s085.pdf
103593cd53SAlexander A. Klimov  * https://www.ti.com/lit/ds/symlink/dac084s085.pdf
113593cd53SAlexander A. Klimov  * https://www.ti.com/lit/ds/symlink/dac104s085.pdf
123593cd53SAlexander A. Klimov  * https://www.ti.com/lit/ds/symlink/dac124s085.pdf
1361011264SLukas Wunner  */
1461011264SLukas Wunner 
1561011264SLukas Wunner #include <linux/iio/iio.h>
1661011264SLukas Wunner #include <linux/module.h>
1740f84dd0SJonathan Cameron #include <linux/mod_devicetable.h>
1861011264SLukas Wunner #include <linux/regulator/consumer.h>
1961011264SLukas Wunner #include <linux/spi/spi.h>
2061011264SLukas Wunner 
21f98677cfSLukas Wunner enum { dual_8bit, dual_10bit, dual_12bit, quad_8bit, quad_10bit, quad_12bit };
22f98677cfSLukas Wunner 
23f98677cfSLukas Wunner struct ti_dac_spec {
24f98677cfSLukas Wunner 	u8 num_channels;
25f98677cfSLukas Wunner 	u8 resolution;
26f98677cfSLukas Wunner };
27f98677cfSLukas Wunner 
28f98677cfSLukas Wunner static const struct ti_dac_spec ti_dac_spec[] = {
29f98677cfSLukas Wunner 	[dual_8bit]  = { .num_channels = 2, .resolution = 8  },
30f98677cfSLukas Wunner 	[dual_10bit] = { .num_channels = 2, .resolution = 10 },
31f98677cfSLukas Wunner 	[dual_12bit] = { .num_channels = 2, .resolution = 12 },
32f98677cfSLukas Wunner 	[quad_8bit]  = { .num_channels = 4, .resolution = 8  },
33f98677cfSLukas Wunner 	[quad_10bit] = { .num_channels = 4, .resolution = 10 },
34f98677cfSLukas Wunner 	[quad_12bit] = { .num_channels = 4, .resolution = 12 },
35f98677cfSLukas Wunner };
36f98677cfSLukas Wunner 
3761011264SLukas Wunner /**
3861011264SLukas Wunner  * struct ti_dac_chip - TI DAC chip
3961011264SLukas Wunner  * @lock: protects write sequences
4061011264SLukas Wunner  * @vref: regulator generating Vref
4161011264SLukas Wunner  * @mesg: SPI message to perform a write
4261011264SLukas Wunner  * @xfer: SPI transfer used by @mesg
4361011264SLukas Wunner  * @val: cached value of each output
4461011264SLukas Wunner  * @powerdown: whether the chip is powered down
4561011264SLukas Wunner  * @powerdown_mode: selected by the user
4661011264SLukas Wunner  * @resolution: resolution of the chip
4761011264SLukas Wunner  * @buf: buffer for @xfer
4861011264SLukas Wunner  */
4961011264SLukas Wunner struct ti_dac_chip {
5061011264SLukas Wunner 	struct mutex lock;
5161011264SLukas Wunner 	struct regulator *vref;
5261011264SLukas Wunner 	struct spi_message mesg;
5361011264SLukas Wunner 	struct spi_transfer xfer;
5461011264SLukas Wunner 	u16 val[4];
5561011264SLukas Wunner 	bool powerdown;
5661011264SLukas Wunner 	u8 powerdown_mode;
5761011264SLukas Wunner 	u8 resolution;
58*03a0cc77SJonathan Cameron 	u8 buf[2] __aligned(IIO_DMA_MINALIGN);
5961011264SLukas Wunner };
6061011264SLukas Wunner 
6161011264SLukas Wunner #define WRITE_NOT_UPDATE(chan)	(0x00 | (chan) << 6)
6261011264SLukas Wunner #define WRITE_AND_UPDATE(chan)	(0x10 | (chan) << 6)
6361011264SLukas Wunner #define WRITE_ALL_UPDATE	 0x20
6461011264SLukas Wunner #define POWERDOWN(mode) 	(0x30 | ((mode) + 1) << 6)
6561011264SLukas Wunner 
ti_dac_cmd(struct ti_dac_chip * ti_dac,u8 cmd,u16 val)6661011264SLukas Wunner static int ti_dac_cmd(struct ti_dac_chip *ti_dac, u8 cmd, u16 val)
6761011264SLukas Wunner {
6861011264SLukas Wunner 	u8 shift = 12 - ti_dac->resolution;
6961011264SLukas Wunner 
7061011264SLukas Wunner 	ti_dac->buf[0] = cmd | (val >> (8 - shift));
7161011264SLukas Wunner 	ti_dac->buf[1] = (val << shift) & 0xff;
7261011264SLukas Wunner 	return spi_sync(ti_dac->mesg.spi, &ti_dac->mesg);
7361011264SLukas Wunner }
7461011264SLukas Wunner 
7561011264SLukas Wunner static const char * const ti_dac_powerdown_modes[] = {
7661011264SLukas Wunner 	"2.5kohm_to_gnd", "100kohm_to_gnd", "three_state",
7761011264SLukas Wunner };
7861011264SLukas Wunner 
ti_dac_get_powerdown_mode(struct iio_dev * indio_dev,const struct iio_chan_spec * chan)7961011264SLukas Wunner static int ti_dac_get_powerdown_mode(struct iio_dev *indio_dev,
8061011264SLukas Wunner 				     const struct iio_chan_spec *chan)
8161011264SLukas Wunner {
8261011264SLukas Wunner 	struct ti_dac_chip *ti_dac = iio_priv(indio_dev);
8361011264SLukas Wunner 
8461011264SLukas Wunner 	return ti_dac->powerdown_mode;
8561011264SLukas Wunner }
8661011264SLukas Wunner 
ti_dac_set_powerdown_mode(struct iio_dev * indio_dev,const struct iio_chan_spec * chan,unsigned int mode)8761011264SLukas Wunner static int ti_dac_set_powerdown_mode(struct iio_dev *indio_dev,
8861011264SLukas Wunner 				     const struct iio_chan_spec *chan,
8961011264SLukas Wunner 				     unsigned int mode)
9061011264SLukas Wunner {
9161011264SLukas Wunner 	struct ti_dac_chip *ti_dac = iio_priv(indio_dev);
9261011264SLukas Wunner 	int ret = 0;
9361011264SLukas Wunner 
9461011264SLukas Wunner 	if (ti_dac->powerdown_mode == mode)
9561011264SLukas Wunner 		return 0;
9661011264SLukas Wunner 
9761011264SLukas Wunner 	mutex_lock(&ti_dac->lock);
9861011264SLukas Wunner 	if (ti_dac->powerdown) {
9961011264SLukas Wunner 		ret = ti_dac_cmd(ti_dac, POWERDOWN(mode), 0);
10061011264SLukas Wunner 		if (ret)
10161011264SLukas Wunner 			goto out;
10261011264SLukas Wunner 	}
10361011264SLukas Wunner 	ti_dac->powerdown_mode = mode;
10461011264SLukas Wunner 
10561011264SLukas Wunner out:
10661011264SLukas Wunner 	mutex_unlock(&ti_dac->lock);
10761011264SLukas Wunner 	return ret;
10861011264SLukas Wunner }
10961011264SLukas Wunner 
11061011264SLukas Wunner static const struct iio_enum ti_dac_powerdown_mode = {
11161011264SLukas Wunner 	.items = ti_dac_powerdown_modes,
11261011264SLukas Wunner 	.num_items = ARRAY_SIZE(ti_dac_powerdown_modes),
11361011264SLukas Wunner 	.get = ti_dac_get_powerdown_mode,
11461011264SLukas Wunner 	.set = ti_dac_set_powerdown_mode,
11561011264SLukas Wunner };
11661011264SLukas Wunner 
ti_dac_read_powerdown(struct iio_dev * indio_dev,uintptr_t private,const struct iio_chan_spec * chan,char * buf)11761011264SLukas Wunner static ssize_t ti_dac_read_powerdown(struct iio_dev *indio_dev,
11861011264SLukas Wunner 				     uintptr_t private,
11961011264SLukas Wunner 				     const struct iio_chan_spec *chan,
12061011264SLukas Wunner 				     char *buf)
12161011264SLukas Wunner {
12261011264SLukas Wunner 	struct ti_dac_chip *ti_dac = iio_priv(indio_dev);
12361011264SLukas Wunner 
124f46ac009SLars-Peter Clausen 	return sysfs_emit(buf, "%d\n", ti_dac->powerdown);
12561011264SLukas Wunner }
12661011264SLukas Wunner 
ti_dac_write_powerdown(struct iio_dev * indio_dev,uintptr_t private,const struct iio_chan_spec * chan,const char * buf,size_t len)12761011264SLukas Wunner static ssize_t ti_dac_write_powerdown(struct iio_dev *indio_dev,
12861011264SLukas Wunner 				      uintptr_t private,
12961011264SLukas Wunner 				      const struct iio_chan_spec *chan,
13061011264SLukas Wunner 				      const char *buf, size_t len)
13161011264SLukas Wunner {
13261011264SLukas Wunner 	struct ti_dac_chip *ti_dac = iio_priv(indio_dev);
13361011264SLukas Wunner 	bool powerdown;
13461011264SLukas Wunner 	int ret;
13561011264SLukas Wunner 
13674f582ecSLars-Peter Clausen 	ret = kstrtobool(buf, &powerdown);
13761011264SLukas Wunner 	if (ret)
13861011264SLukas Wunner 		return ret;
13961011264SLukas Wunner 
14061011264SLukas Wunner 	if (ti_dac->powerdown == powerdown)
14161011264SLukas Wunner 		return len;
14261011264SLukas Wunner 
14361011264SLukas Wunner 	mutex_lock(&ti_dac->lock);
14461011264SLukas Wunner 	if (powerdown)
14561011264SLukas Wunner 		ret = ti_dac_cmd(ti_dac, POWERDOWN(ti_dac->powerdown_mode), 0);
14661011264SLukas Wunner 	else
14761011264SLukas Wunner 		ret = ti_dac_cmd(ti_dac, WRITE_AND_UPDATE(0), ti_dac->val[0]);
14861011264SLukas Wunner 	if (!ret)
14961011264SLukas Wunner 		ti_dac->powerdown = powerdown;
15061011264SLukas Wunner 	mutex_unlock(&ti_dac->lock);
15161011264SLukas Wunner 
15261011264SLukas Wunner 	return ret ? ret : len;
15361011264SLukas Wunner }
15461011264SLukas Wunner 
15561011264SLukas Wunner static const struct iio_chan_spec_ext_info ti_dac_ext_info[] = {
15661011264SLukas Wunner 	{
15761011264SLukas Wunner 		.name	   = "powerdown",
15861011264SLukas Wunner 		.read	   = ti_dac_read_powerdown,
15961011264SLukas Wunner 		.write	   = ti_dac_write_powerdown,
16061011264SLukas Wunner 		.shared	   = IIO_SHARED_BY_TYPE,
16161011264SLukas Wunner 	},
16261011264SLukas Wunner 	IIO_ENUM("powerdown_mode", IIO_SHARED_BY_TYPE, &ti_dac_powerdown_mode),
163ffc7c517SAntoniu Miclaus 	IIO_ENUM_AVAILABLE("powerdown_mode", IIO_SHARED_BY_TYPE, &ti_dac_powerdown_mode),
16461011264SLukas Wunner 	{ },
16561011264SLukas Wunner };
16661011264SLukas Wunner 
16761011264SLukas Wunner #define TI_DAC_CHANNEL(chan) {					\
16861011264SLukas Wunner 	.type = IIO_VOLTAGE,					\
16961011264SLukas Wunner 	.channel = (chan),					\
17061011264SLukas Wunner 	.address = (chan),					\
17161011264SLukas Wunner 	.indexed = true,					\
17261011264SLukas Wunner 	.output = true,						\
17361011264SLukas Wunner 	.datasheet_name = (const char[]){ 'A' + (chan), 0 },	\
17461011264SLukas Wunner 	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),		\
17561011264SLukas Wunner 	.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),	\
17661011264SLukas Wunner 	.ext_info = ti_dac_ext_info,				\
17761011264SLukas Wunner }
17861011264SLukas Wunner 
17961011264SLukas Wunner static const struct iio_chan_spec ti_dac_channels[] = {
18061011264SLukas Wunner 	TI_DAC_CHANNEL(0),
18161011264SLukas Wunner 	TI_DAC_CHANNEL(1),
18261011264SLukas Wunner 	TI_DAC_CHANNEL(2),
18361011264SLukas Wunner 	TI_DAC_CHANNEL(3),
18461011264SLukas Wunner };
18561011264SLukas Wunner 
ti_dac_read_raw(struct iio_dev * indio_dev,struct iio_chan_spec const * chan,int * val,int * val2,long mask)18661011264SLukas Wunner static int ti_dac_read_raw(struct iio_dev *indio_dev,
18761011264SLukas Wunner 			   struct iio_chan_spec const *chan,
18861011264SLukas Wunner 			   int *val, int *val2, long mask)
18961011264SLukas Wunner {
19061011264SLukas Wunner 	struct ti_dac_chip *ti_dac = iio_priv(indio_dev);
19161011264SLukas Wunner 	int ret;
19261011264SLukas Wunner 
19361011264SLukas Wunner 	switch (mask) {
19461011264SLukas Wunner 	case IIO_CHAN_INFO_RAW:
19561011264SLukas Wunner 		*val = ti_dac->val[chan->channel];
19661011264SLukas Wunner 		ret = IIO_VAL_INT;
19761011264SLukas Wunner 		break;
19861011264SLukas Wunner 
19961011264SLukas Wunner 	case IIO_CHAN_INFO_SCALE:
20061011264SLukas Wunner 		ret = regulator_get_voltage(ti_dac->vref);
20161011264SLukas Wunner 		if (ret < 0)
20261011264SLukas Wunner 			return ret;
20361011264SLukas Wunner 
20461011264SLukas Wunner 		*val = ret / 1000;
20561011264SLukas Wunner 		*val2 = ti_dac->resolution;
20661011264SLukas Wunner 		ret = IIO_VAL_FRACTIONAL_LOG2;
20761011264SLukas Wunner 		break;
20861011264SLukas Wunner 
20961011264SLukas Wunner 	default:
21061011264SLukas Wunner 		ret = -EINVAL;
21161011264SLukas Wunner 	}
21261011264SLukas Wunner 
21361011264SLukas Wunner 	return ret;
21461011264SLukas Wunner }
21561011264SLukas Wunner 
ti_dac_write_raw(struct iio_dev * indio_dev,struct iio_chan_spec const * chan,int val,int val2,long mask)21661011264SLukas Wunner static int ti_dac_write_raw(struct iio_dev *indio_dev,
21761011264SLukas Wunner 			    struct iio_chan_spec const *chan,
21861011264SLukas Wunner 			    int val, int val2, long mask)
21961011264SLukas Wunner {
22061011264SLukas Wunner 	struct ti_dac_chip *ti_dac = iio_priv(indio_dev);
22161011264SLukas Wunner 	int ret;
22261011264SLukas Wunner 
22361011264SLukas Wunner 	switch (mask) {
22461011264SLukas Wunner 	case IIO_CHAN_INFO_RAW:
22561011264SLukas Wunner 		if (ti_dac->val[chan->channel] == val)
22661011264SLukas Wunner 			return 0;
22761011264SLukas Wunner 
22861011264SLukas Wunner 		if (val >= (1 << ti_dac->resolution) || val < 0)
22961011264SLukas Wunner 			return -EINVAL;
23061011264SLukas Wunner 
23161011264SLukas Wunner 		if (ti_dac->powerdown)
23261011264SLukas Wunner 			return -EBUSY;
23361011264SLukas Wunner 
23461011264SLukas Wunner 		mutex_lock(&ti_dac->lock);
23561011264SLukas Wunner 		ret = ti_dac_cmd(ti_dac, WRITE_AND_UPDATE(chan->channel), val);
23661011264SLukas Wunner 		if (!ret)
23761011264SLukas Wunner 			ti_dac->val[chan->channel] = val;
23861011264SLukas Wunner 		mutex_unlock(&ti_dac->lock);
23961011264SLukas Wunner 		break;
24061011264SLukas Wunner 
24161011264SLukas Wunner 	default:
24261011264SLukas Wunner 		ret = -EINVAL;
24361011264SLukas Wunner 	}
24461011264SLukas Wunner 
24561011264SLukas Wunner 	return ret;
24661011264SLukas Wunner }
24761011264SLukas Wunner 
ti_dac_write_raw_get_fmt(struct iio_dev * indio_dev,struct iio_chan_spec const * chan,long mask)24861011264SLukas Wunner static int ti_dac_write_raw_get_fmt(struct iio_dev *indio_dev,
24961011264SLukas Wunner 				    struct iio_chan_spec const *chan, long mask)
25061011264SLukas Wunner {
25161011264SLukas Wunner 	return IIO_VAL_INT;
25261011264SLukas Wunner }
25361011264SLukas Wunner 
25461011264SLukas Wunner static const struct iio_info ti_dac_info = {
25561011264SLukas Wunner 	.read_raw	   = ti_dac_read_raw,
25661011264SLukas Wunner 	.write_raw	   = ti_dac_write_raw,
25761011264SLukas Wunner 	.write_raw_get_fmt = ti_dac_write_raw_get_fmt,
25861011264SLukas Wunner };
25961011264SLukas Wunner 
ti_dac_probe(struct spi_device * spi)26061011264SLukas Wunner static int ti_dac_probe(struct spi_device *spi)
26161011264SLukas Wunner {
26261011264SLukas Wunner 	struct device *dev = &spi->dev;
263f98677cfSLukas Wunner 	const struct ti_dac_spec *spec;
26461011264SLukas Wunner 	struct ti_dac_chip *ti_dac;
26561011264SLukas Wunner 	struct iio_dev *indio_dev;
26661011264SLukas Wunner 	int ret;
26761011264SLukas Wunner 
26861011264SLukas Wunner 	indio_dev = devm_iio_device_alloc(dev, sizeof(*ti_dac));
26961011264SLukas Wunner 	if (!indio_dev)
27061011264SLukas Wunner 		return -ENOMEM;
27161011264SLukas Wunner 
27261011264SLukas Wunner 	indio_dev->info = &ti_dac_info;
27361011264SLukas Wunner 	indio_dev->name = spi->modalias;
27461011264SLukas Wunner 	indio_dev->modes = INDIO_DIRECT_MODE;
27561011264SLukas Wunner 	indio_dev->channels = ti_dac_channels;
27661011264SLukas Wunner 	spi_set_drvdata(spi, indio_dev);
27761011264SLukas Wunner 
27861011264SLukas Wunner 	ti_dac = iio_priv(indio_dev);
27961011264SLukas Wunner 	ti_dac->xfer.tx_buf = &ti_dac->buf;
28061011264SLukas Wunner 	ti_dac->xfer.len = sizeof(ti_dac->buf);
28161011264SLukas Wunner 	spi_message_init_with_transfers(&ti_dac->mesg, &ti_dac->xfer, 1);
28261011264SLukas Wunner 	ti_dac->mesg.spi = spi;
28361011264SLukas Wunner 
284f98677cfSLukas Wunner 	spec = &ti_dac_spec[spi_get_device_id(spi)->driver_data];
285f98677cfSLukas Wunner 	indio_dev->num_channels = spec->num_channels;
286f98677cfSLukas Wunner 	ti_dac->resolution = spec->resolution;
28761011264SLukas Wunner 
28861011264SLukas Wunner 	ti_dac->vref = devm_regulator_get(dev, "vref");
28961011264SLukas Wunner 	if (IS_ERR(ti_dac->vref))
29061011264SLukas Wunner 		return PTR_ERR(ti_dac->vref);
29161011264SLukas Wunner 
29261011264SLukas Wunner 	ret = regulator_enable(ti_dac->vref);
29361011264SLukas Wunner 	if (ret < 0)
29461011264SLukas Wunner 		return ret;
29561011264SLukas Wunner 
29661011264SLukas Wunner 	mutex_init(&ti_dac->lock);
29761011264SLukas Wunner 
29861011264SLukas Wunner 	ret = ti_dac_cmd(ti_dac, WRITE_ALL_UPDATE, 0);
29961011264SLukas Wunner 	if (ret) {
30061011264SLukas Wunner 		dev_err(dev, "failed to initialize outputs to 0\n");
30161011264SLukas Wunner 		goto err;
30261011264SLukas Wunner 	}
30361011264SLukas Wunner 
30461011264SLukas Wunner 	ret = iio_device_register(indio_dev);
30561011264SLukas Wunner 	if (ret)
30661011264SLukas Wunner 		goto err;
30761011264SLukas Wunner 
30861011264SLukas Wunner 	return 0;
30961011264SLukas Wunner 
31061011264SLukas Wunner err:
31161011264SLukas Wunner 	mutex_destroy(&ti_dac->lock);
31261011264SLukas Wunner 	regulator_disable(ti_dac->vref);
31361011264SLukas Wunner 	return ret;
31461011264SLukas Wunner }
31561011264SLukas Wunner 
ti_dac_remove(struct spi_device * spi)316a0386bbaSUwe Kleine-König static void ti_dac_remove(struct spi_device *spi)
31761011264SLukas Wunner {
31861011264SLukas Wunner 	struct iio_dev *indio_dev = spi_get_drvdata(spi);
31961011264SLukas Wunner 	struct ti_dac_chip *ti_dac = iio_priv(indio_dev);
32061011264SLukas Wunner 
32161011264SLukas Wunner 	iio_device_unregister(indio_dev);
32261011264SLukas Wunner 	mutex_destroy(&ti_dac->lock);
32361011264SLukas Wunner 	regulator_disable(ti_dac->vref);
32461011264SLukas Wunner }
32561011264SLukas Wunner 
32661011264SLukas Wunner static const struct of_device_id ti_dac_of_id[] = {
32761011264SLukas Wunner 	{ .compatible = "ti,dac082s085" },
32861011264SLukas Wunner 	{ .compatible = "ti,dac102s085" },
32961011264SLukas Wunner 	{ .compatible = "ti,dac122s085" },
33061011264SLukas Wunner 	{ .compatible = "ti,dac084s085" },
33161011264SLukas Wunner 	{ .compatible = "ti,dac104s085" },
33261011264SLukas Wunner 	{ .compatible = "ti,dac124s085" },
33361011264SLukas Wunner 	{ }
33461011264SLukas Wunner };
33561011264SLukas Wunner MODULE_DEVICE_TABLE(of, ti_dac_of_id);
33661011264SLukas Wunner 
33761011264SLukas Wunner static const struct spi_device_id ti_dac_spi_id[] = {
338f98677cfSLukas Wunner 	{ "dac082s085", dual_8bit  },
339f98677cfSLukas Wunner 	{ "dac102s085", dual_10bit },
340f98677cfSLukas Wunner 	{ "dac122s085", dual_12bit },
341f98677cfSLukas Wunner 	{ "dac084s085", quad_8bit  },
342f98677cfSLukas Wunner 	{ "dac104s085", quad_10bit },
343f98677cfSLukas Wunner 	{ "dac124s085", quad_12bit },
34461011264SLukas Wunner 	{ }
34561011264SLukas Wunner };
34661011264SLukas Wunner MODULE_DEVICE_TABLE(spi, ti_dac_spi_id);
34761011264SLukas Wunner 
34861011264SLukas Wunner static struct spi_driver ti_dac_driver = {
34961011264SLukas Wunner 	.driver = {
35061011264SLukas Wunner 		.name		= "ti-dac082s085",
35140f84dd0SJonathan Cameron 		.of_match_table	= ti_dac_of_id,
35261011264SLukas Wunner 	},
35361011264SLukas Wunner 	.probe	  = ti_dac_probe,
35461011264SLukas Wunner 	.remove   = ti_dac_remove,
35561011264SLukas Wunner 	.id_table = ti_dac_spi_id,
35661011264SLukas Wunner };
35761011264SLukas Wunner module_spi_driver(ti_dac_driver);
35861011264SLukas Wunner 
35961011264SLukas Wunner MODULE_AUTHOR("Lukas Wunner <lukas@wunner.de>");
36061011264SLukas Wunner MODULE_DESCRIPTION("Texas Instruments 8/10/12-bit 2/4-channel DAC driver");
36161011264SLukas Wunner MODULE_LICENSE("GPL v2");
362