This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | resources:tools-software:linux-drivers:iio-accelerometer:adis16203 [09 Nov 2011 11:27] – [Supported Devices] Michael Hennerich | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== ADIS16203 IIO Programmable 360 Degrees Inclinometer Linux Driver ====== | ||
+ | ===== Supported Devices ===== | ||
+ | |||
+ | * [[adi> | ||
+ | |||
+ | ===== Evaluation Boards ===== | ||
+ | |||
+ | * [[adi> | ||
+ | ===== Description ===== | ||
+ | |||
+ | This is a Linux industrial I/O ([[software: | ||
+ | The industrial I/O subsystem provides a unified framework for drivers for many different types of converters and sensors using a number of different physical interfaces (i2c, spi, etc). | ||
+ | See [[software: | ||
+ | |||
+ | ====== Source Code ====== | ||
+ | |||
+ | ===== Status ===== | ||
+ | |||
+ | ^ Source | ||
+ | | [[bfgit> | ||
+ | ===== Files ===== | ||
+ | |||
+ | ^ Function ^ File ^ | ||
+ | | driver | ||
+ | | driver | ||
+ | | driver | ||
+ | | include | [[staging.kernel.org> | ||
+ | |||
+ | {{page> | ||
+ | |||
+ | Depending on the converter IC used, you may need to set the modalias accordingly, | ||
+ | It may also required to adjust max_speed_hz. Please consult the datasheet, for maximum spi clock supported by the device in question. | ||
+ | |||
+ | <code c> | ||
+ | static struct spi_board_info board_spi_board_info[] __initdata = { | ||
+ | #if defined(CONFIG_ADIS16203) \ | ||
+ | || defined(CONFIG_ADIS16203_MODULE) | ||
+ | { | ||
+ | .modalias = " | ||
+ | .max_speed_hz = 1000000, | ||
+ | .bus_num = 0, | ||
+ | .chip_select = 5, /* CS, change it for your board */ | ||
+ | .platform_data = NULL, /* No spi_driver specific config */ | ||
+ | .mode = SPI_MODE_3, | ||
+ | .irq = IRQ_PF4, | ||
+ | }, | ||
+ | #endif | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | <code c> | ||
+ | static int __init board_init(void) | ||
+ | { | ||
+ | [--snip--] | ||
+ | |||
+ | spi_register_board_info(board_spi_board_info, | ||
+ | |||
+ | [--snip--] | ||
+ | |||
+ | return 0; | ||
+ | } | ||
+ | arch_initcall(board_init); | ||
+ | </ | ||
+ | |||
+ | ====== Adding Linux driver support ====== | ||
+ | |||
+ | Configure kernel with "make menuconfig" | ||
+ | "make qconfig" | ||
+ | |||
+ | < | ||
+ | The ADIS16203 Driver depends on **CONFIG_SPI** | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Linux Kernel Configuration | ||
+ | Device Drivers | ||
+ | [*] Staging drivers | ||
+ | < | ||
+ | --- Industrial I/O support | ||
+ | -*- | ||
+ | -*- | ||
+ | -*- | ||
+ | |||
+ | *** Accelerometers *** | ||
+ | [--snip--] | ||
+ | |||
+ | < | ||
+ | [--snip--] | ||
+ | |||
+ | </ | ||
+ | |||
+ | ====== Hardware configuration ====== | ||
+ | |||
+ | |||
+ | ====== Driver testing ====== | ||
+ | |||
+ | {{page> | ||
+ | |||
+ | <box 100% green|shell prompt running on the target> | ||
+ | < | ||
+ | root:/> **cd / | ||
+ | root:/ | ||
+ | iio: | ||
+ | |||
+ | |||
+ | root:/ | ||
+ | root:/ | ||
+ | drwxr-xr-x | ||
+ | -r--r--r-- | ||
+ | -rw-r--r-- | ||
+ | -r--r--r-- | ||
+ | -rw-r--r-- | ||
+ | -r--r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -r--r--r-- | ||
+ | -rw-r--r-- | ||
+ | -r--r--r-- | ||
+ | -rw-r--r-- | ||
+ | -r--r--r-- | ||
+ | -rw-r--r-- | ||
+ | -r--r--r-- | ||
+ | drwxr-xr-x | ||
+ | --w------- | ||
+ | drwxr-xr-x | ||
+ | lrwxrwxrwx | ||
+ | drwxr-xr-x | ||
+ | -rw-r--r-- | ||
+ | </ | ||
+ | |||
+ | === Show device name === | ||
+ | |||
+ | <box 100% green|shell prompt running on the target> | ||
+ | < | ||
+ | root:/ | ||
+ | adis16203 | ||
+ | </ | ||
+ | |||
+ | === ADIS16203 device attributes === | ||
+ | |||
+ | For a detailed description please see: | ||
+ | [[staging.kernel.org> | ||
+ | |||
+ | ^ Device files ^ | ||
+ | | in_incli_x_calibbias | | ||
+ | | in_incli_x_raw | | ||
+ | | in_incli_x_scale | | ||
+ | | in_incli_y_raw | | ||
+ | | in_incli_y_scale | | ||
+ | | in_temp0_offset | | ||
+ | | in_temp0_raw | | ||
+ | | in_temp0_scale | | ||
+ | | in_voltage0_supply_raw | | ||
+ | | in_voltage0_supply_scale | | ||
+ | | in_voltage1_raw | | ||
+ | | in_voltage1_scale | | ||
+ | | name | | ||
+ | | reset | | ||
+ | |||
+ | ===== Trigger management ===== | ||
+ | |||
+ | < | ||
+ | This driver only supports it's own default trigger source **adis16203-dev0** | ||
+ | </ | ||
+ | |||
+ | <box 100% green|shell prompt running on the target> | ||
+ | < | ||
+ | root:/ | ||
+ | adis16203-dev0 | ||
+ | </ | ||
+ | |||
+ | ===== Buffer management ===== | ||
+ | |||
+ | <box 100% green|shell prompt running on the target> | ||
+ | < | ||
+ | root:/ | ||
+ | **bytes_per_datum** | ||
+ | </ | ||
+ | |||
+ | {{page> | ||
+ | |||
+ | <box 100% green|shell prompt running on the target> | ||
+ | < | ||
+ | root:/ | ||
+ | in_incli_x_en | ||
+ | in_incli_x_index | ||
+ | in_incli_x_type | ||
+ | in_incli_y_en | ||
+ | in_incli_y_index | ||
+ | in_incli_y_type | ||
+ | </ | ||
+ | |||
+ | {{page> | ||
+ | |||
+ | ====== More Information ====== | ||
+ | |||
+ | {{page> |