|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
AD9523 clock generator interface. More...
Data Structures | |
| struct | ad9523_status |
| PLL, VCXO and VCO status, as read back from the chip. More... | |
Macros | |
| #define | AD9523_NUM_CLK_OUT 14 |
| Number of clock outputs on an AD9523. | |
| #define | AD9523_CLK_OUT(n) |
Build a clock_control_subsys_t handle for output n (0..13). | |
Functions | |
| int | ad9523_get_status (const struct device *dev, struct ad9523_status *status) |
| Read back VCXO/PLL1/PLL2 lock detail. | |
| int | ad9523_sync (const struct device *dev) |
| Issue a chip-level SYNC. | |
AD9523 clock generator interface.
| #define AD9523_CLK_OUT | ( | n | ) |
#include <zephyr/drivers/clock_control/ad9523.h>
Build a clock_control_subsys_t handle for output n (0..13).
The handle is the output number biased by one: output 0 is a real output, and an unbiased handle of 0 would be indistinguishable from CLOCK_CONTROL_SUBSYS_ALL (which is NULL) in the subsystem API.
| #define AD9523_NUM_CLK_OUT 14 |
#include <zephyr/drivers/clock_control/ad9523.h>
Number of clock outputs on an AD9523.
| int ad9523_get_status | ( | const struct device * | dev, |
| struct ad9523_status * | status ) |
#include <zephyr/drivers/clock_control/ad9523.h>
Read back VCXO/PLL1/PLL2 lock detail.
clock_control_get_status() collapses this to a single enum clock_control_status; this returns the underlying detail, which is what a JESD204 bring-up failure needs in order to be diagnosable.
Performs SPI reads, so it must be called from thread context.
| dev | AD9523 device. |
| status | Destination, populated on success only. |
| 0 | Success. |
| -EINVAL | Not an AD9523 device, or status is NULL. |
| -EWOULDBLOCK | Called from an ISR. |
| -errno | Other negative errno from the SPI transfer. |
| int ad9523_sync | ( | const struct device * | dev | ) |
#include <zephyr/drivers/clock_control/ad9523.h>
Issue a chip-level SYNC.
Toggles SYNC_MAN_CTRL (status-signals register 0x232 bit 16) with an io_update on each edge, re-aligning every output divider to its programmed phase.
Performs SPI transfers, so it must be called from thread context.
| dev | AD9523 device. |
| 0 | Success. |
| -EINVAL | Not an AD9523 device. |
| -EWOULDBLOCK | Called from an ISR. |
| -errno | Other negative errno from the SPI transfer. |