Re: [PATCH v13 3/3] iio: adc: ad7173: add AD7173 driver

Ceclan Dumitru
2024-02-20T11:25:10Z

On 2/20/24 12:38, Nuno Sá wrote:
> On Tue, 2024-02-20 at 11:43 +0200, Dumitru Ceclan wrote:

...

>
>> +};
>>
>> + indio_dev->name = st->info->name;
>> + indio_dev->modes = INDIO_DIRECT_MODE;
>> + indio_dev->info = &ad7173_info;
>> +
>> + spi->mode = SPI_MODE_3;
>> +
>
> I don't think we need the above. We should just enforce it to SPI_CPOL| SPI_CPHA in
> the bindings [2].
>
> [2]: https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml#L45

Rob Herring V1:

"""
> + required:
> + - compatible
> + - reg
> + - interrupts
> + - spi-cpol
> + - spi-cpha

If the device(s) are not configurable, then you shouldn't need these 2
properties. The driver can hardcode the correct setting.
"""