summaryrefslogtreecommitdiffstats
path: root/include/linux/iio
diff options
context:
space:
mode:
authorTomas Novotny <tomas@novotny.cz>2016-10-18 19:43:08 +0200
committerJonathan Cameron <jic23@kernel.org>2016-10-23 19:34:23 +0100
commit29157c6d601db8cb9f3bea93fc933b73db3bf869 (patch)
tree52c2b4ea6db8e053859b73aa5f1b1d74daf07b10 /include/linux/iio
parent8b0ee39f4de13f9d8b50846621e558b78b7defff (diff)
downloadop-kernel-dev-29157c6d601db8cb9f3bea93fc933b73db3bf869.zip
op-kernel-dev-29157c6d601db8cb9f3bea93fc933b73db3bf869.tar.gz
iio: dac: mcp4725: support voltage reference selection
MCP47x6 chip supports selection of a voltage reference (VDD, VREF buffered or unbuffered). MCP4725 doesn't have this feature thus the eventual setting is ignored and user is warned. The setting is stored only in the volatile memory of the chip. You need to manually store it to the EEPROM of the chip via 'store_eeprom' sysfs entry. Signed-off-by: Tomas Novotny <tomas@novotny.cz> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/dac/mcp4725.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/iio/dac/mcp4725.h b/include/linux/iio/dac/mcp4725.h
index 7c062e8..628b2cf 100644
--- a/include/linux/iio/dac/mcp4725.h
+++ b/include/linux/iio/dac/mcp4725.h
@@ -9,7 +9,18 @@
#ifndef IIO_DAC_MCP4725_H_
#define IIO_DAC_MCP4725_H_
+/**
+ * struct mcp4725_platform_data - MCP4725/6 DAC specific data.
+ * @use_vref: Whether an external reference voltage on Vref pin should be used.
+ * Additional vref-supply must be specified when used.
+ * @vref_buffered: Controls buffering of the external reference voltage.
+ *
+ * Vref related settings are available only on MCP4756. See
+ * Documentation/devicetree/bindings/iio/dac/mcp4725.txt for more information.
+ */
struct mcp4725_platform_data {
+ bool use_vref;
+ bool vref_buffered;
};
#endif /* IIO_DAC_MCP4725_H_ */
OpenPOWER on IntegriCloud