mbox series

[RFC/RFT,0/1] add simple logic analyzer using polling

Message ID 20210330085655.12615-1-wsa+renesas@sang-engineering.com
Headers show
Series add simple logic analyzer using polling | expand

Message

Wolfram Sang March 30, 2021, 8:56 a.m. UTC
Okay, this one is maybe a bit brave, let's see if it is suitable for
upstream. This is an in-kernel logic analyzer based on GPIO polling with
local irqs disabled. Besides the driver, there is a script which
isolates a CPU to get towards 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. So, I wonder if we want to provide this for others,
too, and have it in Linus' tree. Documentation is within the patch, to
get a better idea what this is all about.

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/topic/gpio-logic-analyzer

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

Looking forward to comments. 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 simple logic analyzer using polling

 .../dev-tools/gpio-logic-analyzer.rst         |  63 ++++
 Documentation/dev-tools/index.rst             |   1 +
 .../bindings/misc/gpio-logic-analyzer.yaml    |  40 ++
 drivers/misc/Kconfig                          |  12 +
 drivers/misc/Makefile                         |   1 +
 drivers/misc/gpio-logic-analyzer.c            | 355 ++++++++++++++++++
 tools/debugging/gpio-logic-analyzer           | 156 ++++++++
 7 files changed, 628 insertions(+)
 create mode 100644 Documentation/dev-tools/gpio-logic-analyzer.rst
 create mode 100644 Documentation/devicetree/bindings/misc/gpio-logic-analyzer.yaml
 create mode 100644 drivers/misc/gpio-logic-analyzer.c
 create mode 100755 tools/debugging/gpio-logic-analyzer