2024-01-15 19:53:13

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 2/2] iio: adc: ad7173: add support for additional models

On Mon, Jan 15, 2024 at 3:54 PM Dumitru Ceclan <mitrutzceclan@gmailcom> wrote:
>
> Add support for Analog Devices AD7172-2, AD7175-8, AD7177-2

Missing period.

..

> + * AD717X family SPI ADC driver

X --> x

..

> + * Suported devices:

Supported

..

> + * AD7172-2 AD7172-4 AD7173-8 AD7175-2 AD7175-8 AD7176-2 AD7177-2

Too long and no good delimiter (like comma), can you reformat this list?

..

> +#define AD7172_2_ID 0x00d0
> +#define AD7172_4_ID 0x2050
> #define AD7173_ID 0x30d0
> +#define AD7175_2_ID 0x0cd0
> +#define AD7175_8_ID 0x3cd0
> #define AD7176_ID 0x0c90
> +#define AD7177_ID 0x4fd0

Why not order by the ID value?

..

> + //AD7177-2 has the filter values [0-6] marked as reserved
> + // datasheet page 58

Be consistent with the type of comments. Either all C++ style or C.
Also missing space in the first line.

..

> + if (ref_sel == AD7173_SETUP_REF_SEL_INT_REF &&
> + st->info->id == AD7172_2_ID){

Missing space.

> + fwnode_handle_put(child);
> + return dev_err_probe(dev, -EINVAL, "Internal reference is not available on ad7172-2\n");
> + }

Not sure if Jonathan makes his series in for fwnode handle RAII.

--
With Best Regards,
Andy Shevchenko