Re: [PATCH v2 4/6] iio: amplifiers: ad8366: add device tree support

From: Andy Shevchenko

Date: Wed Jan 28 2026 - 07:39:27 EST


On Wed, Jan 28, 2026 at 10:23:58AM +0000, Rodrigo Alencar wrote:
> On 26/01/28 12:09PM, Andy Shevchenko wrote:
> > On Wed, Jan 28, 2026 at 09:55:16AM +0000, Rodrigo Alencar wrote:

...

> > So, something like
> >
> > put_unaligned_be16((ch_b << 6) | ch_a, &st->deta[0]);
> >
> > should be better, no? (Note, you would need linux/unaligned.h).
>
> ok, ch_b would have to be u16 and ch_a could be too (for consistency)

Why? u8 should suffice.

--
With Best Regards,
Andy Shevchenko