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
Next revisionBoth sides next revision
resources:tools-software:linux-drivers:iio-adc:ad7606 [27 Apr 2016 17:10] – fix typo Lars-Peter Clausenresources:tools-software:linux-drivers:iio-adc:ad7606 [15 Mar 2017 22:07] – [Example spi_board_info initialization / serial interface] Lars-Peter Clausen
Line 31: Line 31:
  
 ^ Function ^ File ^ ^ Function ^ File ^
-| driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606_core.c]] | +| driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606.c]] |
-| driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606_ring.c]] |+
 | driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606_spi.c]] | | driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606_spi.c]] |
 | driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606_par.c]] | | driver  | [[git.linux.org>drivers/staging/iio/adc/ad7606_par.c]] |
Line 40: Line 39:
  
 {{page>software/linux/docs/platform_and_bus_model#Platform Data&noheader&firstseconly&noeditbtn}} {{page>software/linux/docs/platform_and_bus_model#Platform Data&noheader&firstseconly&noeditbtn}}
- 
-The reference voltage may vary between boards and models. The platform_data for the device's "struct device" holds this information. 
- 
-<code c> 
-/** 
- * struct ad7606_platform_data - platform/board specifc information 
- * @default_os: default oversampling value {0, 2, 4, 8, 16, 32, 64} 
- * @default_range: default range +/-{5000, 10000} mVolt 
- * @gpio_convst: number of gpio connected to the CONVST pin 
- * @gpio_reset: gpio connected to the RESET pin, if not used set to -1 
- * @gpio_range: gpio connected to the RANGE pin, if not used set to -1 
- * @gpio_os0: gpio connected to the OS0 pin, if not used set to -1 
- * @gpio_os1: gpio connected to the OS1 pin, if not used set to -1 
- * @gpio_os2: gpio connected to the OS2 pin, if not used set to -1 
- * @gpio_frstdata: gpio connected to the FRSTDAT pin, if not used set to -1 
- * @gpio_stby: gpio connected to the STBY pin, if not used set to -1 
- */ 
-</code> 
- 
-<source trunk/drivers/staging/iio/adc/ad7606.h:ad7606_platform_data{} c linux-kernel> 
- 
-<code c> 
-static struct ad7606_platform_data ad7606_pdata = { 
- .default_os = 0, 
- .default_range = 10000, 
- .gpio_convst = GPIO_PF9, 
- .gpio_reset = GPIO_PF10, 
- .gpio_range = GPIO_PH0, 
- .gpio_os0 = GPIO_PH1, 
- .gpio_os1 = GPIO_PH2, 
- .gpio_os2 = GPIO_PH3, 
- .gpio_frstdata = -1, 
- .gpio_stby = GPIO_PF12, 
-}; 
-</code> 
- 
 ====== Example platform_device initialization / parallel interface ====== ====== Example platform_device initialization / parallel interface ======
  
Line 157: Line 120:
  .bus_num = 0, /* Framework bus number */  .bus_num = 0, /* Framework bus number */
  .chip_select = 3, /* Framework chip select */  .chip_select = 3, /* Framework chip select */
- .platform_data = &ad7606_pdata, 
  .controller_data = &ad7606_chip_info, /* Blackfin only */  .controller_data = &ad7606_chip_info, /* Blackfin only */
  .irq = IRQ_PH6,  .irq = IRQ_PH6,
resources/tools-software/linux-drivers/iio-adc/ad7606.txt · Last modified: 30 Sep 2019 09:03 by Beniamin Bia