From: Wolfram Sang <wsa+renesas@sang-engineering.com> To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Linus Walleij <linus.walleij@linaro.org>, Ulrich Hecht <ulrich.hecht+renesas@gmail.com>, Wolfram Sang <wsa+renesas@sang-engineering.com> Subject: [RFC PATCH v2 0/1] gpio: add simple logic analyzer using polling Date: Wed, 19 May 2021 15:25:27 +0200 [thread overview] Message-ID: <20210519132528.4394-1-wsa+renesas@sang-engineering.com> (raw) 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
next reply other threads:[~2021-05-19 13:26 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-19 13:25 Wolfram Sang [this message] 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
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=20210519132528.4394-1-wsa+renesas@sang-engineering.com \ --to=wsa+renesas@sang-engineering.com \ --cc=andriy.shevchenko@linux.intel.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 \ --cc=ulrich.hecht+renesas@gmail.com \ --subject='Re: [RFC PATCH v2 0/1] gpio: add simple logic analyzer using polling' \ /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
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).