Re: [PATCH v9 2/2] iio: adc: max14001: New driver

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

 



Return to the public space of the discussion.

On Mon, Jul 10, 2023 at 11:17 AM Paller, Kim Seer
<KimSeer.Paller@xxxxxxxxxx> wrote:
> > From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> > Sent: Monday, July 10, 2023 3:37 PM
> > On Mon, Jul 10, 2023 at 7:27 AM Kim Seer Paller <kimseer.paller@xxxxxxxxxx>
> > wrote:

...

> > > V8 -> V9: Changed SPI buffer data types to __le16,
> >
> > Why?
>
> Based on the previous comments, I have taken the __le16 data type
> into account. The device seems to function the same as the __be data type.
> I have not yet sure but technically speaking, do I have to retain the data
> types as __be16 based on the overall operation?

If the type is __be, the *be*() APIs should be used, otherwise __le and *le*().

...

> > Obviously it's incorrect now even more than before.
> > The types are defined as __le, while ops are against __be.
>
> Would it be right to implement this by reverting the types back to __be?
> What other considerations could there be?

First of all, you need to document what you are doing with these bit
twiddlers. Based on the clear understanding by everyone we can suggest
what data type(s) suits the best.

Hence instead of v10, reply with a draft of the comment in the code (I
have asked before) that explains these bit twiddlers.

-- 
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