All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-gpio@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [PATCH 0/1] gpio: add simple logic analyzer using polling
Date: Wed,  1 Sep 2021 21:45:48 +0200	[thread overview]
Message-ID: <20210901194549.3999-1-wsa+renesas@sang-engineering.com> (raw)

The bravery continues with the next update and first non-RFC version of
the in-kernel logic analyzer based on GPIO polling with local irqs
disabled. It has been been tested locally and remotely. It provided
satisfactory results. Besides the driver, there is also a script which
isolates a CPU to achieve the best possible result. I am aware of the
latency limitations. However, the intention is for debugging only, not
mass production. Especially for remote debugging and to get a first
impression, this has already been useful. Documentation is within the
patch, to get a better idea what this is all about.

Changes since RFC v2:

* took most of the suggestions from Andy's review. For the things I did
  not take, I added comments when appropriate.
* A *lot* of cleanups to the shell script guided by checkers, mainly
  'shellcheck'. This is mainly to ensure that the scripts works on most
  minimal shells. Tested are 'busybox ash', 'dash', and 'bash'.
* a *lot* more error checking and reporting in the script
* I found fatal_signal_pending(), so the sampling process is now
  finally killable \o/
* script sets CPUfreq now to "performance" for the isolated CPU
* the acquisition_delay is now measured before each sampling and not
  only during probe because the probing core is likely not the one
  used for sampling later

Thanks to Andy for many suggestions.

A branch with preparation for the Renesas Salvator-XS (R-Car H3 ES2.0
and M3-N tested) and Falcon boards (R-Car V3U) is here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/gpio-logic-analyzer-v3

The documentation is also available online on the elinux wiki:
https://elinux.org/Kernel_GPIO_Logic_analyzer

Looking forward to comments and especially further tests with different
use cases than mine.

Thanks and all the best,

   Wolfram


Wolfram Sang (1):
  gpio: add sloppy logic analyzer using polling

 .../dev-tools/gpio-sloppy-logic-analyzer.rst  |  71 ++++
 Documentation/dev-tools/index.rst             |   1 +
 drivers/gpio/Kconfig                          |  17 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-sloppy-logic-analyzer.c     | 340 ++++++++++++++++++
 tools/gpio/gpio-sloppy-logic-analyzer         | 214 +++++++++++
 6 files changed, 644 insertions(+)
 create mode 100644 Documentation/dev-tools/gpio-sloppy-logic-analyzer.rst
 create mode 100644 drivers/gpio/gpio-sloppy-logic-analyzer.c
 create mode 100755 tools/gpio/gpio-sloppy-logic-analyzer

-- 
2.30.2


             reply	other threads:[~2021-09-01 19:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 19:45 Wolfram Sang [this message]
2021-09-01 19:45 ` [PATCH 1/1] gpio: add sloppy logic analyzer using polling Wolfram Sang
2021-09-05 11:20   ` Andy Shevchenko
2021-09-06  9:04     ` Wolfram Sang
2021-09-06 10:15       ` Andy Shevchenko
2021-09-06 12:21         ` Wolfram Sang
     [not found]   ` <CAHp75VdNnvUfMEL3gMrJOFix3AATL8LAiU18LXJJVL77feBRow@mail.gmail.com>
2021-09-06  7:38     ` Wolfram Sang
2021-09-06  7:47       ` Andy Shevchenko

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=20210901194549.3999-1-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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.