> -----Original Message----- > From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > Sent: Monday, July 10, 2023 6:50 PM > To: Paller, Kim Seer <KimSeer.Paller@xxxxxxxxxx>; Hennerich, Michael > <Michael.Hennerich@xxxxxxxxxx> > Cc: linux-iio <linux-iio@xxxxxxxxxxxxxxx>; Jonathan Cameron > <jic23@xxxxxxxxxx>; Lars-Peter Clausen <lars@xxxxxxxxxx> > Subject: Re: [PATCH v9 2/2] iio: adc: max14001: New driver > > [External] > > Return to the public space of the discussion. Oh late to notice, I had mistakenly set my email client to "quick reply" instead of 'reply to all'. > 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*(). I became a little confused with the previous discussions, will make the necessary changes accordingly. > > > 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. In patch v9, regarding with my bit arrangement comments, is it somewhat correct or do I need to totally replace it? I am not yet familiar with the terminologies, so I hope you can provide some suggestions and I'll definitely send the draft first. Thanks, Kim