Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
resources:tools-software:linux-drivers:iio-pll:adf4350 [20 Nov 2012 10:44] – [Evaluation Boards] Lars-Peter Clausen | resources:tools-software:linux-drivers:iio-pll:adf4350 [18 Feb 2013 15:45] – The driver is upstream now Lars-Peter Clausen |
---|
| |
^ Source ^ Mainlined? ^ | ^ Source ^ Mainlined? ^ |
| [[git.linux.org>drivers/staging/iio/frequency/adf4350.c|git]] | [[git.linux.org>drivers/staging/iio/frequency/adf4350.c|In Progress]] | | | [[git.linux.org>drivers/iio/frequency/adf4350.c|git]] | [[git.linux.org>drivers/iio/frequency/adf4350.c|Yes]] | |
===== Files ===== | ===== Files ===== |
| |
^ Function ^ File ^ | ^ Function ^ File ^ |
| driver | [[git.linux.org>drivers/staging/iio/frequency/adf4350.c]] | | | driver | [[git.linux.org>drivers/iio/frequency/adf4350.c]] | |
| include | [[git.linux.org>drivers/staging/iio/frequency/adf4350.h]] | | | include | [[git.linux.org>drivers/iio/frequency/adf4350.h]] | |
| Documentation | [[git.linux.org>drivers/staging/iio/Documentation/frequency/sysfs-bus-iio-pll]] | | | Documentation | [[git.linux.org>Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350]] | |
| |
====== Example platform device initialization ====== | ====== Example platform device initialization ====== |
"make qconfig") | "make qconfig") |
| |
<note> | <WRAP round help> |
The ADF4350 Driver depends on **CONFIG_SPI** | The ADF4350 Driver depends on **CONFIG_SPI** |
</note> | </WRAP> |
| |
<code> | <code> |
{{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}} | {{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}} |
| |
<box 100% green|shell prompt running on the target> | <WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> |
<xterm> | <xterm> |
root:/> **cd /sys/bus/iio/devices/** | root:/> **cd /sys/bus/iio/devices/** |
lrwxrwxrwx 1 root root 0 Jan 1 00:01 subsystem -> ../../../../../bus/iio | lrwxrwxrwx 1 root root 0 Jan 1 00:01 subsystem -> ../../../../../bus/iio |
-rw-r--r-- 1 root root 4096 Jan 1 00:01 uevent | -rw-r--r-- 1 root root 4096 Jan 1 00:01 uevent |
</xterm></box> | </xterm></WRAP> |
| |
| |
| |
| |
<box 100% green|shell prompt running on the target> | <WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> |
<xterm> | <xterm> |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat name** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat name** |
adf4350 | adf4350 |
</xterm></box> | </xterm></WRAP> |
| |
=== Set Output Frequency === | === Set Output Frequency === |
out_altvoltageY_locked in order to check whether the PLL has locked or not. | out_altvoltageY_locked in order to check whether the PLL has locked or not. |
| |
<box 100% green|shell prompt running on the target> | <WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> |
<xterm> | <xterm> |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **echo 144825000 > out_altvoltage0_frequency** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **echo 144825000 > out_altvoltage0_frequency** |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltage0_frequency** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltage0_frequency** |
144825000 | 144825000 |
</xterm></box> | </xterm></WRAP> |
| |
=== Set frequency resolution/channel spacing === | === Set frequency resolution/channel spacing === |
generate proper values for multiples of channel spacing. | generate proper values for multiples of channel spacing. |
| |
<box 100% green|shell prompt running on the target> | <WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> |
<xterm> | <xterm> |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **echo 10000 > out_altvoltageY_refin_freq** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **echo 10000 > out_altvoltageY_refin_freq** |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltageY_refin_frequency** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltageY_refin_frequency** |
10000 | 10000 |
</xterm></box> | </xterm></WRAP> |
| |
=== Set reference frequency === | === Set reference frequency === |
The value written has no effect until out_altvoltageY_freq is updated. | The value written has no effect until out_altvoltageY_freq is updated. |
| |
<box 100% green|shell prompt running on the target> | <WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> |
<xterm> | <xterm> |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **echo 10000000 > out_altvoltageY_refin_frequency** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **echo 10000000 > out_altvoltageY_refin_frequency** |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltageY_refin_frequency** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltageY_refin_frequency** |
10000000 | 10000000 |
</xterm></box> | </xterm></WRAP> |
| |
| |
during REFin changes. | during REFin changes. |
| |
<box 100% green|shell prompt running on the target> | <WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> |
<xterm> | <xterm> |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **echo 1 > out_altvoltageY_powerdown** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **echo 1 > out_altvoltageY_powerdown** |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltageY_powerdown** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltageY_powerdown** |
1 | 1 |
</xterm></box> | </xterm></WRAP> |
| |
=== Enable Power-Down === | === Enable Power-Down === |
whether the PLL has locked by reading '1' or not '0'. | whether the PLL has locked by reading '1' or not '0'. |
| |
<box 100% green|shell prompt running on the target> | <WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> |
<xterm> | <xterm> |
root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltageY_locked** | root:/sys/devices/platform/bfin-spi.0/spi0.18/iio:device0> **cat out_altvoltageY_locked** |
1 | 1 |
</xterm></box> | </xterm></WRAP> |
| |
====== More Information ====== | ====== More Information ====== |
| |
{{page>software:linux:docs:iio:iio_snippets#iio pointers&noheader&firstseconly&noeditbtn}} | {{page>software:linux:docs:iio:iio_snippets#iio pointers&noheader&firstseconly&noeditbtn}} |