On Thu, Feb 5, 2026 at 6:49 PM Marcelo Schmitt
[off-list ref] wrote:
ADAQ4216 and ADAQ4224 are similar to AD4030, but feature a PGA circuitry
that scales the analog input signal prior to it reaching the ADC. The PGA
is controlled through a pair of pins (A0 and A1) whose state define the
gain that is applied to the input signal.
Add support for ADAQ4216 and ADAQ4224. Provide a list of PGA options
through the IIO device channel scale available interface and enable control
of the PGA through the channel scale interface.
...
+static const int adaq4216_hw_gains_vpv[] = {
+ MILLI / 3, /* 333 */
I would go with
1 * MILLI / 3, ...
for the sake of consistency.
+ 5 * MILLI / 9, /* 555 */
+ 20 * MILLI / 9, /* 2222 */
+ 20 * MILLI / 3, /* 6666 */
+};
...
+ gain_nano = gain_int * NANO + gain_fract;
+
Unneeded blank line.
+ if (!in_range(gain_nano, 1, ADAQ4616_PGA_GAIN_MAX_NANO))
+ return -EINVAL;
...
No need to resend, if Jonathan and others are okay with the series, he
might be able to tweak this whilst applying.
--
With Best Regards,
Andy Shevchenko