linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/1] gpio: add simple logic analyzer using polling
@ 2021-05-19 13:25 Wolfram Sang
  2021-05-19 13:25 ` [RFC PATCH v2 1/1] misc: add sloppy " Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2021-05-19 13:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-renesas-soc, linux-gpio, Andy Shevchenko, Linus Walleij,
	Ulrich Hecht, Wolfram Sang

The bravery continues with the second RFC for the in-kernel logic
analyzer based on GPIO polling with local irqs disabled. 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 only for debugging. 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 v1:

* moved from misc/ to gpio/. Thanks to Linus and Bartosz for offering a
  home for this
* renamed from "simple logic analyzer" to "sloppy logic analyzer"
  everywhere to make its limitations crystal clear
* moved the parser for trigger data from the kernel into the script.
  Much cleaner kernel code but passing binary data now. We'll see...
* all gpios now must be named. This removes ugly fallback code and
  allows to use generic device properties instead of OF properties only.
* added and updated documentation
* triggers are also now checked at sample speed, not full speed
* replaced pr_* printouts with dev_*
* removed bashisms in the script (tested with bash, dash, and busybox
  ash)
* depends on EXPERT now
* small bugfixes, refactoring, cleanups all around

Thanks to Andy, Linus, Randy, and Ulrich for suggestions and testing.

A branch with preparation for the Renesas Salvator-XS boards is here:
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/gpio-logic-analyzer-v2

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. I have looked enough at the code, fresh view would
really help. And still, if somebody has a pointer how to detect if a
task was requested to be killed (while irqs and preemption are
disabled), I'd appreciate that to avoid the currently unkillable
sub-process.

All the best,

   Wolfram

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

 .../dev-tools/gpio-sloppy-logic-analyzer.rst  |  72 ++++
 Documentation/dev-tools/index.rst             |   1 +
 drivers/gpio/Kconfig                          |  17 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-sloppy-logic-analyzer.c     | 317 ++++++++++++++++++
 tools/gpio/gpio-sloppy-logic-analyzer         | 200 +++++++++++
 6 files changed, 608 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-11 12:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 13:25 [RFC PATCH v2 0/1] gpio: add simple logic analyzer using polling Wolfram Sang
2021-05-19 13:25 ` [RFC PATCH v2 1/1] misc: add sloppy " Wolfram Sang
2021-05-19 14:49   ` Andy Shevchenko
2021-07-30 19:57     ` Wolfram Sang
2021-07-30 20:45       ` Andy Shevchenko
2021-08-10  8:32         ` Wolfram Sang
2021-08-11 12:40           ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).