On Tue, Jul 11, 2023 at 9:55 AM Paller, Kim Seer <KimSeer.Paller@xxxxxxxxxx> wrote: > > From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > > On Mon, Jul 10, 2023 at 11:17 AM Paller, Kim Seer > > <KimSeer.Paller@xxxxxxxxxx> wrote: ... > > 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. I'm not sure I understand what comments you are referring to. The v9 does not explain the algorithm clearly. What you need is to cite or retell what the datasheet explains about bit ordering along with the proposed algo (in AN as far as I understood). Because I haven't got, why do you need to use be16 + bitrev if your data is le16 (and that's my understanding of the datasheet). Is it because of the answer from the device? I don't remember if it keep the bit order the same (i.e. D0...D9) as on the wire. For the terminology, use what the datasheet and AN provide you. Also good to put those URLs to the code and datasheet as Datasheet: tag in the commit message. -- With Best Regards, Andy Shevchenko