Re: [PATCH v3 2/3] iio: adc: Support ROHM BD79112 ADC/GPIO

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




On Fri, Sep 5, 2025 at 10:10 AM Matti Vaittinen
<mazziesaccount@xxxxxxxxx> wrote:
> On 05/09/2025 09:54, Andy Shevchenko wrote:
> > On Fri, Sep 5, 2025 at 9:42 AM Matti Vaittinen <mazziesaccount@xxxxxxxxx> wrote:
...
> >> +/*
> >> + * The data-sheet explains register I/O communication as follows:
> >> + *
> >> + * Read, two 16-bit sequences separated by CSB:
> >> + * MOSI:
> >> + * SCK: | 1 | 2 | 3 | 4 | 5 .. 8 | 9 .. 16 |
> >> + * data:| 0 | 0 |IOSET| RW (1) | ADDR | 8'b0 |
> >> + *
> >> + * MISO:
> >> + * SCK: | 1 .. 8 | 9 .. 16 |
> >> + * data:| 8'b0 | data |
> >> + *
> >> + * Note, CSB is shown to be released between writing the address (MOSI) and
> >> + * reading the register data (MISO).
> >> + *
> >> + * Write, single 16-bit sequence:
> >> + * MOSI:
> >> + * SCK: | 1 | 2 | 3 | 4 | 5 .. 8 |
> >> + * data:| 0 | 0 |IOSET| RW(0) | ADDR |
> >> + *
> >> + * MISO:
> >> + * SCK: | 1 .. 8 |
> >> + * data:| data |
> >> + */
> >
> > What I meant in previous reviews is that the | are not aligned (in the
> > same columns). Is it on purpose? If so, I can't read that as I don't
> > understand the meaning of | in each case. For example, the data starts
> > with 0, followed by 0, and the latter one is when SCL is #1? Okay, but
> > how to read IOSET that overlaps 2 SCK cycles and is unaligned with
> > times... I'm really quite confused by these charts.
>
> Ah. I think I now know what you mean. Whitespaces are hard :)
> I see I have '\t' between the SCK: and first |.
> >> + * SCK: /* '\t' here */ | 1 | 2 | 3 | 4 | 5 .. 8 |
>
> It works perfectly on my editor, which has tab width 8. Thus, all the
> '|' on SCK and data rows are perfectly aligned for me. My original
> thought has been to align the first '|' on all rows by tab, but since
> the " * data:" is already 8 chars I didn't add a tab for this row...
>
> I now realize this will not work if tabs behave different from my setup.
> I will do replacing the '\t' with ' '. Does this make it better for your
> editor or do you see some other problem besides that?
I can't answer before seeing. Can you reply with what you mean?
> Thanks for the patience explaining it.
You're welcome!
-- 
With Best Regards,
Andy Shevchenko

[Index of Archives] [Linux SPI] [Linux Kernel] [Linux ARM (vger)] [Linux ARM MSM] [Linux Omap] [Linux Arm] [Linux Tegra] [Fedora ARM] [Linux for Samsung SOC] [eCos] [Linux Fastboot] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [Linux MIPS] [Yosemite Campsites]

(追記) (追記ここまで)
Powered by Linux

AltStyle によって変換されたページ (->オリジナル) /