Conversation
Check if SYNC occurred during synchronizing using EXT SYNC. Signed-off-by: George Mois <george.mois@analog.com>
8689c8a to
668d8f5
Compare
|
v2:
|
668d8f5 to
e57d34c
Compare
|
v3:
|
e57d34c to
f9363fb
Compare
f9363fb to
2c5f38e
Compare
|
v4:
|
|
Documentation still errors out: |
amiclaus
left a comment
There was a problem hiding this comment.
when adding new drivers you need to follow the standard pattern. drivers/category/driver_name/ this should fix the doc build. on the other hand wondering if we should place or not the mcs under jesd204.
| /* NCO Sync */ | ||
| if (phy->l_f_sync && phy->leader) { | ||
| do { | ||
| ret = no_os_gpio_get_value(phy->lf_input_pin, &val); |
| ret = no_os_gpio_set_value(phy->lf_output_pin, 1); | ||
| if (phy->l_f_sync && !phy->leader) | ||
| do { | ||
| ret = no_os_gpio_get_value(phy->lf_input_pin, &val); |
| if (ret != 0) | ||
| return ret; | ||
| if (phy->lf_output_pin) | ||
| ret = no_os_gpio_set_value(phy->lf_output_pin, 1); |
There was a problem hiding this comment.
ret is overwritten below.
|
|
||
| ret = no_os_gpio_get(&dev->gpio_req, init_param->gpio_req); | ||
| if (ret < 0) | ||
| return ret; |
| if (ret < 0) | ||
| return ret; | ||
| if (dev->gpio_req) | ||
| no_os_gpio_direction_output(dev->gpio_req, 0); |
| pr_err("Error reading alarm status.\n"); | ||
| return ret; | ||
| } | ||
| if (!HMC7044_SYSREF_SYNC_STAT(val)) |
| pr_debug("%s:%d reason %s\n", __func__, __LINE__, | ||
| jesd204_state_op_reason_str(reason)); | ||
|
|
||
| no_os_gpio_set_value(mcs_gpio->gpio_req, 1); |
There was a problem hiding this comment.
return values no handled.
| }; | ||
|
|
||
| status = mcs_gpio_init(&mcs_dev, &mcs_gpio_init_params); | ||
| if (status) { |
| MCS_GPIO Driver Initialization Example | ||
| -------------------------------------- | ||
|
|
||
| .. code-block:: bash |
There was a problem hiding this comment.
this should be .. code-block:: c
| #ifdef MCS_CONTINUOUS_SYSREF | ||
| status = mcs_gpio_init(&mcs_dev, &mcs_gpio_init_params); | ||
| if (status) | ||
| printf("mcs_gpio_init() error: %" PRId32 "\n", status); |
There was a problem hiding this comment.
we continue if errors occur?
Do you mean the jesd204 folder in drivers/axi_core ? I think it might be confusing because the driver has nothing to do with axi. If you mean no-OS/jesd204 I don't think it would be appropriate because it contains only fsm and core and nothing driver related imo. There's also the possibility of putting the mcs driver in util or maybe a new folder util/jesd204? |
Yep, makes sense. |
Add leader-follower synchronization logic. Signed-off-by: George Mois <george.mois@analog.com>
Add the driver for a MCS GPIO device that can be part of a JESD topology. Signed-off-by: George Mois <george.mois@analog.com>
2c5f38e to
1597b60
Compare
|
v5:
|
Add short documentation for mcs_gpio. Signed-off-by: Ramona Alexandra Nechita <ramona.nechita@analog.com>
Add options for leader-follower single MxFE synchronization. Add the MCS GPIO to the JESD topology for leader-follower MxFE synchronization. Added a MCS_CONTINUOUS_SYSREF variable for the MXFE sync use case. Signed-off-by: George Mois <george.mois@analog.com>
1597b60 to
d8ee68e
Compare
Pull Request Description
Modify ad9081 and hmc7044 to enable support for multi-chip sync and update the project accordingly.
PR Type
PR Checklist