Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp376416lqh; Fri, 31 May 2024 04:20:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0CbIfrGpJkYwYYZvB62OQ4L6IA4wnUFu/mGWCo8S2S411GykRfVtkGA2YmAHDzfEeLebbk5VAZG4/dkGKFo2z42ShCKGzpboORoZjmw== X-Google-Smtp-Source: AGHT+IFHLV0iWCZnCSMK1tqETbghbcE0k6L9xnCE8jQTAI2rKlvLbJ1dbFp20sbX4wiVxDqD1PI/ X-Received: by 2002:a05:620a:13e8:b0:792:9d4c:6433 with SMTP id af79cd13be357-794f5ebe456mr150563885a.51.1717154415638; Fri, 31 May 2024 04:20:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717154415; cv=pass; d=google.com; s=arc-20160816; b=xnP+V+zMClw28KuQXESoiLSrQX2BMw4OS7c3rZRfMgqQlBB5ex84etvA32wDbLcICv X8WWA0ye0CC3n4ZhmIjXSL1HMcTWjovIENP7x7Fvz1R2+ujj+ZYbRwpk5cGJcNkIQdZO /oJ0YiI17ApZHING5bYWJ9S4k0F/isvSma/M6+ehebJmpUVIhhbu4lHSAocu+q00PSBS 3u/DmIZzRMIpIUQ/VfkF5Xn8sMxsG+KKcZ29r0ARI+8q0Zp94Kpr5uK18pcowqMYBsR8 0qvL+q0unyXoHTcNxw6lTDUO2JIiuqrt+DsE1D/Wys0FIy4SanzAaVWccxvdp3Wicy2G EdQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to :organization:message-id:date:subject:cc:to:from:dkim-signature :dkim-signature; bh=dBKf2zZ6ISHeCjN/chmz4IF4IvJbZqScCFwFIMuTRXM=; fh=tvw1AmFpKh+87NZTQgM8IdqA6xxlyZzalu7YUEeP93w=; b=sghQ10+b73baaQKT2ynu/7AA/yPTzTIbLQ1lUUaUxAlQWLHTzsOQ8q0/rc4+FoACMU 3CWKROnEGisEJ5k0RMU4kib5+yxdqT9FSaHvNrhIDi7Y22lVLg7bbOL03VySlsnqrhI5 GpNNfuUhDUijQHuJN9M3G0CvD0tVcY2IfUBkn9OpS/VpK/3fdAkrz/mDwnuyg4WDjH0M dp7fBsRaUboFDuH8YInKGEMA4pA1lY+kmFiOqgkzagPBIMombOR20TYNYkdYTesjRg9m STSZt2U4ufhqlzcRzkl8uVFxQjRDTzLCVypv0sbj1hKPztbfxc4nCRFHmDQSG13BNqUV Yscg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b="S6/XqAY7"; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=hcQ3Gwxo; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-196727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f3064b46si167666885a.284.2024.05.31.04.20.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 04:20:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b="S6/XqAY7"; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=hcQ3Gwxo; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-196727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5B3051C2346E for ; Fri, 31 May 2024 11:20:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C02EB15746A; Fri, 31 May 2024 11:20:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="S6/XqAY7"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="hcQ3Gwxo" Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82A9E15746B; Fri, 31 May 2024 11:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717154408; cv=none; b=MHvRhIi+qvZaqlyPs5Z2sF8X869oxjJWdwaSpBlyXbfFOhbObkZ0OLSST7pYjmxMSYH8TXoXsB7pYGLoGAE7DdRBKbQmr2LmI2EwWWa2qohXnoX2XtlsCKZdvYRZVkBmOYpJnFKuetAi4Z+27nbJYRTa3mj9Lcdg7glX01XZmjM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717154408; c=relaxed/simple; bh=yK/9zuweDOypzYDJEBoGAgQ/cyW+LWy0AQZxqNE129s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Md8eG7v4aJjdCqaqw4e/T1avGTjTuGrllGpXBMxQLo0oTyoTGoCEBhYSXxQXb2maHb86VUesGC0ij48cz6dXAd3waS42oU/n8DpQiPG3W2WtcmUo632G4gvj4K7D7YUQ2WHCa5rfZB8Ji72zsBMr8crbzbonzc2XNAiv584TWHg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=S6/XqAY7; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=hcQ3Gwxo reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1717154404; x=1748690404; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dBKf2zZ6ISHeCjN/chmz4IF4IvJbZqScCFwFIMuTRXM=; b=S6/XqAY7IA7MuOe1R4LPK2qkd/XL2MkJLYuccHCXw0cUzNwvx6l08zkZ Bw5iDw5ZWTKR/mhdKlwBbtwN0LJlJHYx2N6ia+Y0nMb00hztMtlszDo/m 0SimSNXSXV9oPoFkCm2WbPsukP1v0ShOUWhPkZU2VHYsGl+gqqc7E8sJ5 /oEP9BiaKBCIrTVpsEDlPPn3/HNO228ca7jUPHptxbslAjAjUEHwuAwPw Vf/1/W0aBEHXXGoEi49td1pixK+jOsGSpLieZZVvhh+G1EC7TmBqRIwub tRU62Bvy3fnmksXUaRFCL2k1F/hzdOLtmuImPE47S+HHGjgb/MMKbQpbI g==; X-CSE-ConnectionGUID: VjAggmQpSy615veur+5o+w== X-CSE-MsgGUID: 9j/bxm4oQeWL8attay58SQ== X-IronPort-AV: E=Sophos;i="6.08,204,1712613600"; d="scan'208";a="37159682" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 31 May 2024 13:20:02 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7A44E1664A0; Fri, 31 May 2024 13:19:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1717154397; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=dBKf2zZ6ISHeCjN/chmz4IF4IvJbZqScCFwFIMuTRXM=; b=hcQ3GwxoQ6Dq+OVdklHuJTT67XqYyfbQL0wxRqo7nbnt/8OfGyP2wYg/R0Fqvy9sDljz/k xDSfZNsmsYGJG9NVdKUjaQwM/Ifd5OL/YVsjn+UJWNIzZSMAHK8rlSalq1JoVrJnABkY6h a5xyFx+BeRswdkRz3jXZGiN1kh1Vg/uvUF0/bQj/VNByKquZkLnQyKIjuGo5Js/bHhJoL8 1AGeVp2xSSDxBXDshVOQBjVUkzcoArUmt5zuIPUBRXYSQcsmKP/566RMOo1C7BuxPhNzNv lMP5dbQrfkgI2NHi3zM1arZr3YmaW3qSA3WGb63tnMazMMI6lezkV2UdYTE9MQ== From: Alexander Stein To: Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko Subject: Re: [PATCH v2 2/2] gpiolib: Show more info for interrupt only lines in debugfs Date: Fri, 31 May 2024 13:19:56 +0200 Message-ID: <7750850.EvYhyI6sBW@steina-w> Organization: TQ-Systems GmbH In-Reply-To: <20240530191418.1138003-3-andriy.shevchenko@linux.intel.com> References: <20240530191418.1138003-1-andriy.shevchenko@linux.intel.com> <20240530191418.1138003-3-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Last-TLS-Session-Version: TLSv1.3 Hi, Am Donnerstag, 30. Mai 2024, 21:12:30 CEST schrieb Andy Shevchenko: > Show more info for interrupt only lines in debugfs. It's useful > to monitor the lines that have been never requested as GPIOs, > but IRQs. I was trying to test this on TQMa8MPQL (i.MX8MP) using gpio-mxc.c. But apparently this series only has an effect when gpiochip_lock_as_irq() is called eventually. I'm wondering what needs to be done so IRQ only GPIOs are listed in debugfs. Using irq_request_resources/irq_release_resour= ces similar to what pinctrl-at91.c is doing? Best regards, Alexander > Reviewed-by: Linus Walleij > Signed-off-by: Andy Shevchenko > --- > drivers/gpio/gpiolib.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > index a6032b84ba98..f3b2f5c4781d 100644 > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -4888,11 +4888,11 @@ static void gpiolib_dbg_show(struct seq_file *s, = struct gpio_device *gdev) > =20 > for_each_gpio_desc(gc, desc) { > guard(srcu)(&desc->gdev->desc_srcu); > - if (test_bit(FLAG_REQUESTED, &desc->flags)) { > + is_irq =3D test_bit(FLAG_USED_AS_IRQ, &desc->flags); > + if (is_irq || test_bit(FLAG_REQUESTED, &desc->flags)) { > gpiod_get_direction(desc); > is_out =3D test_bit(FLAG_IS_OUT, &desc->flags); > value =3D gpio_chip_get_value(gc, desc); > - is_irq =3D test_bit(FLAG_USED_AS_IRQ, &desc->flags); > active_low =3D test_bit(FLAG_ACTIVE_LOW, &desc->flags); > seq_printf(s, " gpio-%-3u (%-20.20s|%-20.20s) %s %s %s%s\n", > gpio, desc->name ?: "", gpiod_get_label(desc), >=20 =2D-=20 TQ-Systems GmbH | M=FChlstra=DFe 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht M=FCnchen, HRB 105018 Gesch=E4ftsf=FChrer: Detlef Schneider, R=FCdiger Stahl, Stefan Schneider http://www.tq-group.com/