From patchwork Sat Sep 18 08:33:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 1529616 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=sang-engineering.com header.i=@sang-engineering.com header.a=rsa-sha256 header.s=k1 header.b=Iox+zPqP; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4HBPGh0CKnz9sXV for ; Sat, 18 Sep 2021 18:33:16 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237838AbhIRIeh (ORCPT ); Sat, 18 Sep 2021 04:34:37 -0400 Received: from www.zeus03.de ([194.117.254.33]:45230 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237824AbhIRIeg (ORCPT ); Sat, 18 Sep 2021 04:34:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=xcgHZW1fn8JNYZk7NWnhJxUbZkD WeQrcJqzkNGP8+rQ=; b=Iox+zPqPtcQMBCrsiEYb1ESMfJnMu3bx7Dcp0D5+MI+ kBBQn/TIDvJlcQSpYeewu4m23iy1imYXxbDSYfw8dgx7d5+65v7jGd+2VR5g80Y/ oau9IrG1DXHieqzWo7Gb1N2ovYY7J7i/ffYywzKNmWMw9jBCnkaPFPxyog49HLXM = Received: (qmail 1828668 invoked from network); 18 Sep 2021 10:33:11 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Sep 2021 10:33:11 +0200 X-UD-Smtp-Session: l3s3148p1@D5rH5UDMbrEgAwDPXyF2APs7JXaA4etD From: Wolfram Sang To: linux-gpio@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Andy Shevchenko , Linus Walleij , linux-kernel@vger.kernel.org, Wolfram Sang Subject: [PATCH v2 0/1] gpio: add simple logic analyzer using polling Date: Sat, 18 Sep 2021 10:33:06 +0200 Message-Id: <20210918083307.3195-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The bravery continues with the next update 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 v1: * addressed Andy's review comments (thanks!) * mutex gets destroyed on remove * make use of the snprintf return value * improved errno * script: use only progname instead of $0 * script: refactor 'shift' usage in command line handling * spelling fixes * script: fixed a bug when using '--instance' * short success message after proper initialization I had a look at Andy's other suggestion, too, but decided against them. Either I liked the current style better or they can be added later when we actually need them. I've used the analyzer in a few more scenarios and was happy with the outcome. Looking forward to other tests and comments. From my side this looks good to go. Happy hacking, 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 | 341 ++++++++++++++++++ tools/gpio/gpio-sloppy-logic-analyzer | 221 ++++++++++++ 6 files changed, 652 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