summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/dac/ad5791.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 18:14:49 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 18:14:49 (GMT)
commitb13bc8dda81c54a66a1c84e66f60b8feba659f28 (patch)
tree100a26eada424fa5d9b0e5eaaf4e23b8fa036fc8 /drivers/staging/iio/dac/ad5791.h
parent9fc377799bc9bfd8d5cb35d0d1ea2e2458cbdbb3 (diff)
parent419e9266884fa853179ab726c27a63a9d3ae46e3 (diff)
downloadlinux-fsl-qoriq-b13bc8dda81c54a66a1c84e66f60b8feba659f28.tar.xz
Merge tag 'staging-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging tree patches from Greg Kroah-Hartman: "Here's the big staging tree merge for the 3.6-rc1 merge window. There are some patches in here outside of drivers/staging/, notibly the iio code (which is still stradeling the staging / not staging boundry), the pstore code, and the tracing code. All of these have gotten acks from the various subsystem maintainers to be included in this tree. The pstore and tracing patches are related, and are coming here as they replace one of the android staging drivers. Otherwise, the normal staging mess. Lots of cleanups and a few new drivers (some iio drivers, and the large csr wireless driver abomination.) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fixed up trivial conflicts in drivers/staging/comedi/drivers/s626.h and drivers/staging/gdm72xx/netlink_k.c * tag 'staging-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1108 commits) staging: csr: delete a bunch of unused library functions staging: csr: remove csr_utf16.c staging: csr: remove csr_pmem.h staging: csr: remove CsrPmemAlloc staging: csr: remove CsrPmemFree() staging: csr: remove CsrMemAllocDma() staging: csr: remove CsrMemCalloc() staging: csr: remove CsrMemAlloc() staging: csr: remove CsrMemFree() and CsrMemFreeDma() staging: csr: remove csr_util.h staging: csr: remove CsrOffSetOf() stating: csr: remove unneeded #includes in csr_util.c staging: csr: make CsrUInt16ToHex static staging: csr: remove CsrMemCpy() staging: csr: remove CsrStrLen() staging: csr: remove CsrVsnprintf() staging: csr: remove CsrStrDup staging: csr: remove CsrStrChr() staging: csr: remove CsrStrNCmp staging: csr: remove CsrStrCmp ...
Diffstat (limited to 'drivers/staging/iio/dac/ad5791.h')
-rw-r--r--drivers/staging/iio/dac/ad5791.h112
1 files changed, 0 insertions, 112 deletions
diff --git a/drivers/staging/iio/dac/ad5791.h b/drivers/staging/iio/dac/ad5791.h
deleted file mode 100644
index fd7edbd..0000000
--- a/drivers/staging/iio/dac/ad5791.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * AD5791 SPI DAC driver
- *
- * Copyright 2011 Analog Devices Inc.
- *
- * Licensed under the GPL-2.
- */
-
-#ifndef SPI_AD5791_H_
-#define SPI_AD5791_H_
-
-#define AD5791_RES_MASK(x) ((1 << (x)) - 1)
-#define AD5791_DAC_MASK AD5791_RES_MASK(20)
-#define AD5791_DAC_MSB (1 << 19)
-
-#define AD5791_CMD_READ (1 << 23)
-#define AD5791_CMD_WRITE (0 << 23)
-#define AD5791_ADDR(addr) ((addr) << 20)
-
-/* Registers */
-#define AD5791_ADDR_NOOP 0
-#define AD5791_ADDR_DAC0 1
-#define AD5791_ADDR_CTRL 2
-#define AD5791_ADDR_CLRCODE 3
-#define AD5791_ADDR_SW_CTRL 4
-
-/* Control Register */
-#define AD5791_CTRL_RBUF (1 << 1)
-#define AD5791_CTRL_OPGND (1 << 2)
-#define AD5791_CTRL_DACTRI (1 << 3)
-#define AD5791_CTRL_BIN2SC (1 << 4)
-#define AD5791_CTRL_SDODIS (1 << 5)
-#define AD5761_CTRL_LINCOMP(x) ((x) << 6)
-
-#define AD5791_LINCOMP_0_10 0
-#define AD5791_LINCOMP_10_12 1
-#define AD5791_LINCOMP_12_16 2
-#define AD5791_LINCOMP_16_19 3
-#define AD5791_LINCOMP_19_20 12
-
-#define AD5780_LINCOMP_0_10 0
-#define AD5780_LINCOMP_10_20 12
-
-/* Software Control Register */
-#define AD5791_SWCTRL_LDAC (1 << 0)
-#define AD5791_SWCTRL_CLR (1 << 1)
-#define AD5791_SWCTRL_RESET (1 << 2)
-
-#define AD5791_DAC_PWRDN_6K 0
-#define AD5791_DAC_PWRDN_3STATE 1
-
-/*
- * TODO: struct ad5791_platform_data needs to go into include/linux/iio
- */
-
-/**
- * struct ad5791_platform_data - platform specific information
- * @vref_pos_mv: Vdd Positive Analog Supply Volatge (mV)
- * @vref_neg_mv: Vdd Negative Analog Supply Volatge (mV)
- * @use_rbuf_gain2: ext. amplifier connected in gain of two configuration
- */
-
-struct ad5791_platform_data {
- u16 vref_pos_mv;
- u16 vref_neg_mv;
- bool use_rbuf_gain2;
-};
-
-/**
- * struct ad5791_chip_info - chip specific information
- * @get_lin_comp: function pointer to the device specific function
- */
-
-struct ad5791_chip_info {
- int (*get_lin_comp) (unsigned int span);
-};
-
-/**
- * struct ad5791_state - driver instance specific data
- * @us: spi_device
- * @reg_vdd: positive supply regulator
- * @reg_vss: negative supply regulator
- * @chip_info: chip model specific constants
- * @vref_mv: actual reference voltage used
- * @vref_neg_mv: voltage of the negative supply
- * @pwr_down_mode current power down mode
- */
-
-struct ad5791_state {
- struct spi_device *spi;
- struct regulator *reg_vdd;
- struct regulator *reg_vss;
- const struct ad5791_chip_info *chip_info;
- unsigned short vref_mv;
- unsigned int vref_neg_mv;
- unsigned ctrl;
- unsigned pwr_down_mode;
- bool pwr_down;
-};
-
-/**
- * ad5791_supported_device_ids:
- */
-
-enum ad5791_supported_device_ids {
- ID_AD5760,
- ID_AD5780,
- ID_AD5781,
- ID_AD5791,
-};
-
-#endif /* SPI_AD5791_H_ */