Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
resources:tools-software:linux-drivers:iio-adc:ad7887 [03 Jan 2013 20:42] – external edit resources:tools-software:linux-drivers:iio-adc:ad7887 [11 Feb 2016 20:46] – [Status] Lars-Peter Clausen
Line 14: Line 14:
  
   * [[adi>EVAL-AD7887CBZ]]   * [[adi>EVAL-AD7887CBZ]]
 +
 ===== Description ===== ===== Description =====
  
Line 24: Line 25:
 ===== Status ===== ===== Status =====
  
- Source   Mainlined?  +^ Source ^ Mainlined? ^ 
-| [[git.linux.org>drivers/staging/iio/adc/ad7887_core.c|git]] |  [[git.linux.org>drivers/staging/iio/adc/ad7887_core.c|Yes]]  |+| [[git.linux.org>drivers/iio/adc/ad7887.c|git]] | [[git.linux.org>drivers/iio/adc/ad7887.c|Yes]] | 
 ===== Files ===== ===== Files =====
  
 ^ Function ^ File ^ ^ Function ^ File ^
-| driver  | [[git.linux.org>drivers/staging/iio/adc/ad7887_core.c]] | +| driver  | [[git.linux.org>drivers/iio/adc/ad7887.c]] | 
-driver  | [[git.linux.org>drivers/staging/iio/adc/ad7887_ring.c]] | +include | [[git.linux.org>include/linux/platform_data/ad7887.h]] |
-| include | [[git.linux.org>drivers/staging/iio/adc/ad7887.h]] | +
 ====== Example platform device initialization ====== ====== Example platform device initialization ======
  
Line 39: Line 39:
 The reference volatage may vary between boards and models. The platform_data for the device's "struct device" holds this information. The reference volatage may vary between boards and models. The platform_data for the device's "struct device" holds this information.
  
-<source trunk/drivers/staging/iio/adc/ad7887.h:ad7887_platform_data{} c linux-kernel>+<code c> 
 +/** 
 + * struct ad7887_platform_data - AD7887 ADC driver platform data 
 + * @en_dual: Whether to use dual channel mode. If set to true AIN1 becomes the 
 +  second input channel, and Vref is internally connected to Vdd. If set to 
 +  false the device is used in single channel mode and AIN1/Vref is used as 
 +  VREF input. 
 + * @use_onchip_refWhether to use the onchip reference. If set to true the 
 +  internal 2.5V reference is used. If set to false a external reference is 
 +  used. 
 + */ 
 +struct ad7887_platform_data { 
 + bool en_dual; 
 + bool use_onchip_ref; 
 +}
 +</code>
  
 <code c> <code c>
 static struct ad7887_platform_data ad7887_pdata = { static struct ad7887_platform_data ad7887_pdata = {
- .vref_mv = 2500, 
  .en_dual = false,  .en_dual = false,
  .use_onchip_ref = false,  .use_onchip_ref = false,
 }; };
 </code> </code>
- 
 ===== Specifying reference voltage via the regulator framework ===== ===== Specifying reference voltage via the regulator framework =====
  
Line 161: Line 174:
 <code> <code>
 Linux Kernel Configuration Linux Kernel Configuration
- Device Drivers  ---> +    Device Drivers  ---> 
- [*] Staging drivers  ---> +        ... 
- <*>     Industrial I/O support ---> +        <*>     Industrial I/O support ---> 
-     --- Industrial I/O support +            --- Industrial I/O support 
-     -*-   Enable ring buffer support within IIO +            ... 
-     -*-     Industrial I/O lock free software ring +            Analog to digital converters  --- 
-     -*-   Enable triggered sampling support +                ... 
- +                <*>  Analog Devices AD7887 ADC driver 
-           *** Analog to digital converters *** +                ... 
-     [--snip--] +            ... 
- +        ...
-     <*>   Analog Devices AD7887 ADC driver +
- +
-     [--snip--] +
 </code> </code>
  
resources/tools-software/linux-drivers/iio-adc/ad7887.txt · Last modified: 27 Apr 2016 17:12 by Lars-Peter Clausen