Re: [PATCH v2 6/7] iio: adc: ad485x: add ad485x driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 8, 2024 at 1:48 PM Miclaus, Antoniu
<Antoniu.Miclaus@xxxxxxxxxx> wrote:

...

> > > +       int gain;
> >
> > Should be u8 gain[2] and...

I should have added "...independently of the use of bulk operations."

> As discussed in previous patch series, the bulk operations won't work for these
> chips. The CS needs to be raised between each byte read/written.

And as it was put independently by two people, we should really know
the real issue on the wire with this. And if it's as described, try to
find an existing example in the kernel that uses a similar approach. I
think regmap SPI should have such a feature.

> Therefore using u8 gain[2]  here  and in other places will be just an extra populated
> array since  regmap_read requires `unsigned int` as input.

The problem here is open coded endianess conversion.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux