Hello,
There is a line of code in adf4351_set_freq() that does not seem correct. It is as follows:
tmp = freq * (uint64_t)st->r1_mod + (st->fpfd > 1);
frequency is multipled by the modulus value then added with (st->fpfd > 1) and stored in tmp variable. (st->fpfd > 1) will evaluate to 1 which will add as 1 Hz to tmp. It seems that (st->fpfd > 1) is not needed.
Any feedback would be appreciated. Thanks.
-Tom