All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 1/1] gpio: add sloppy logic analyzer using polling
Date: Fri, 7 Jan 2022 18:08:45 +0100	[thread overview]
Message-ID: <CAMuHMdW+=5UM+Jcbu9pTi-tKCfJh42pRk0YrA9ZSbvziNsbAFg@mail.gmail.com> (raw)
In-Reply-To: <YcMg8NzjlNDLksNT@ninjato>

Hi Wolfram,

On Wed, Dec 22, 2021 at 1:58 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > > Yes, the search engines helped[1]. I run a minimal system, so when I
> > > mount cpusets, it will actually mount cgroups with a default mount
> > > option of "noprefix". But you likely run a rootfs with cgroups already,
> > > so it gets mounted directly without "noprefix". Then, when the logic
> > > analyzer tries to mount again, the implied default "noprefix" is
> > > discarded.
> >
> > Yeah, systemd on Debian has it mounted.
>
> So, the proper solution is to use/mount 'cgroups2' instead of 'cpuset'.
> But this needs more thinking and testing and, thus, another revision.
> Dunno if I can make it this year, so I am probably going to miss the
> next merge window after all :(
>
> Geert, if you still want to test the PFC patch I sent, then this patch
> for the script should get you going:

Thank you, much better!

With this I get:

    1# gpio-sloppy-logic-analyzer -s 1500000 -t 1H+2F -d 15000
    Auto-Isolating CPU1
    Setting up 'i2c2-analyzer': 22500 samples at 1500000Hz with 1H+2F
trigger using CPU1
    1# echo: write error: Numerical result out of range
    Capture error! Check kernel log

kernel log has:

    gpio-sloppy-logic-analyzer i2c2-analyzer: couldn't read GPIOs: -34

with debug code:

    priv->delay_ns = 666
    priv->acq_delay = 2342

Whoops, R-Car M2-W GPIO is too slow (clocked at 10 MHz, compared to 66
MHz on R-Car H3 ES2.0)?

Retry with slower speed, until it works:

    1# gpio-sloppy-logic-analyzer -s 300000 -t 1H+2F -d 15000
    Setting up 'i2c2-analyzer': 4500 samples at 300000Hz with 1H+2F
trigger using CPU1
    2# i2cdetect -y 2
    1# cp: cannot stat
'/sys/kernel/debug/gpio-sloppy-logic-analyzer/i2c2-analyzer/sample_data':
No such file or directory

And the sample_data file is indeed missing.

After reboot, everything works fine, and I can no longer reproduce the
missing file issue above, even when repeating the same steps.
The resulting data file can be viewed with pulseview, and I can see SCL
and SDA activity. Nice!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

      reply	other threads:[~2022-01-07 17:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-19 13:24 [PATCH v6 0/1] gpio: add simple logic analyzer using polling Wolfram Sang
2021-12-19 13:24 ` [PATCH v6 1/1] gpio: add sloppy " Wolfram Sang
2021-12-20 14:12   ` Geert Uytterhoeven
2021-12-20 20:01     ` Geert Uytterhoeven
2021-12-22 10:19     ` Wolfram Sang
2021-12-22 10:35       ` Geert Uytterhoeven
2021-12-22 12:58         ` Wolfram Sang
2022-01-07 17:08           ` Geert Uytterhoeven [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdW+=5UM+Jcbu9pTi-tKCfJh42pRk0YrA9ZSbvziNsbAFg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.