If the dpll devices goes to state "unlocked" or "holdover", it may be caused by an error. In that case, allow user to see what the error was. Introduce a new attribute and values it can carry.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -50,6 +50,35 @@ enum dpll_lock_status { · 49 unmodified lines | ||
| 50 | 50 | DPLL_LOCK_STATUS_MAX = (__DPLL_LOCK_STATUS_MAX - 1) |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | +/** | |
| 54 | + * enum dpll_lock_status_error - if previous status change was done due to a | |
| 55 | + * failure, this provides information of dpll device lock status error. Valid | |
| 56 | + * values for DPLL_A_LOCK_STATUS_ERROR attribute | |
| 57 | + * @DPLL_LOCK_STATUS_ERROR_NONE: dpll device lock status was changed without | |
| 58 | + * any error | |
| 59 | + * @DPLL_LOCK_STATUS_ERROR_UNDEFINED: dpll device lock status was changed due | |
| 60 | + * to undefined error. Driver fills this value up in case it is not able to | |
| 61 | + * obtain suitable exact error type. | |
| 62 | + * @DPLL_LOCK_STATUS_ERROR_MEDIA_DOWN: dpll device lock status was changed | |
| 63 | + * because of associated media got down. This may happen for example if dpll | |
| 64 | + * device was previously locked on an input pin of type | |
| 65 | + * PIN_TYPE_SYNCE_ETH_PORT. | |
| 66 | + * @DPLL_LOCK_STATUS_ERROR_FRACTIONAL_FREQUENCY_OFFSET_TOO_HIGH: the FFO | |
| 67 | + * (Fractional Frequency Offset) between the RX and TX symbol rate on the | |
| 68 | + * media got too high. This may happen for example if dpll device was | |
| 69 | + * previously locked on an input pin of type PIN_TYPE_SYNCE_ETH_PORT. | |
| 70 | + */ | |
| 71 | +enum dpll_lock_status_error { | |
| 72 | + DPLL_LOCK_STATUS_ERROR_NONE = 1, | |
| 73 | + DPLL_LOCK_STATUS_ERROR_UNDEFINED, | |
| 74 | + DPLL_LOCK_STATUS_ERROR_MEDIA_DOWN, | |
| 75 | + DPLL_LOCK_STATUS_ERROR_FRACTIONAL_FREQUENCY_OFFSET_TOO_HIGH, | |
| 76 | + | |
| 77 | + /* private: */ | |
| 78 | + __DPLL_LOCK_STATUS_ERROR_MAX, | |
| 79 | + DPLL_LOCK_STATUS_ERROR_MAX = (__DPLL_LOCK_STATUS_ERROR_MAX - 1) | |
| 80 | +}; | |
| 81 | + | |
| 53 | 82 | #define DPLL_TEMP_DIVIDER 1000 |
| 54 | 83 | |
| 55 | 84 | /** |
| @@ -150,6 +179,7 @@ enum dpll_a { · 94 unmodified lines | ||
| 150 | 179 | DPLL_A_LOCK_STATUS, |
| 151 | 180 | DPLL_A_TEMP, |
| 152 | 181 | DPLL_A_TYPE, |
| 182 | + DPLL_A_LOCK_STATUS_ERROR, | |
| 153 | 183 | |
| 154 | 184 | __DPLL_A_MAX, |
| 155 | 185 | DPLL_A_MAX = (__DPLL_A_MAX - 1) |