Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp9525lqh; Thu, 30 May 2024 12:14:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXs4qveTar5qec4LpdwX+/HDMqyQjtuLAkMNZLbxOQpZkHjWMeGRB3ethR4qlA424wpdKp4xYrAFzq99kPArS1BVEWKOsHd9vyZJI8q0A== X-Google-Smtp-Source: AGHT+IEdJ1tcHclI+SLRcaa4rhB8YzcVHc4o5BPkCnFCqEW2567L+ltLEXURXu9OczIqFBCPLhup X-Received: by 2002:aca:1e1a:0:b0:3d1:d44a:a342 with SMTP id 5614622812f47-3d1dcd202aemr2897854b6e.53.1717096477722; Thu, 30 May 2024 12:14:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717096477; cv=pass; d=google.com; s=arc-20160816; b=Dsl/gWoP+KNUQRULuX0u0sIev8KbQy+f0U58umSLAcsBIeh4eEV2bSmeNZXK+3PRf8 c/eGxXcNRScBpKt0RBqh77zg/eWqFQRIK0wdhSjGm8CQNF0SNiEoqLzw+FQjODv/TGf+ dcnpbMEcH2T3h3pegL1xPCd5gx95kvQCAxpUbIWhLuMmPRiVeffSySN/i6YYEMeibePe oQghRqOaQ67Bdzx+KgSaCbGet6AhWD5HJmUFlHc9KGh1Q1l7DQi7SQUvY7VO31HrKDzU v6xtd0p5Abs7mq4VM6AwkNmpHQVTl5gj1qB188G6MhKK+UR1axQh+UEhcUOBXo5wq7Ke FAJA== 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:message-id :date:subject:cc:to:from:dkim-signature; bh=Wb/gMWB1WDlu7fEArdij9DaBEcsauj3yH66UAJFf9Ow=; fh=SVFF+esd2teALkQTF73glKuoQ8orDUlWFxgw6NzwcXw=; b=aTDjgzVodpVDrUOWJW/+tr8DYzNH2xA8+DgZ3sdqovBMGunmb0rAueIqnS3isTxFF/ /M5tFaBijEqleu5NWJSCnT0rQhsHn0tHcLJlHRS9oJeFXMQT5aCVbyxjQE67/Flaba+x TjL1q7+yriKS7khmdp4NCMkte+pU060jVVgL3al94DewNf3WvjTEZhdjNb6qH4Bz009d 78qUZHc+wQcO4MKtUyBo46nZQ9Z3QHgX9ZRTmhFuBzvD7eUg8GkIjir5V42jwpNYzrI+ OxuEBHsacHFw9AUZGQa48khM2pKgTLE0fpHb8GYPpBDjfQp6Tr2wyKLlvJ1upXW/rYK6 Ydnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DO4NWRG2; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195813-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195813-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b42c46fsi2784126d6.462.2024.05.30.12.14.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 12:14:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195813-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DO4NWRG2; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195813-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195813-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 8660B1C22A62 for ; Thu, 30 May 2024 19:14:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DF1C763F9; Thu, 30 May 2024 19:14:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DO4NWRG2" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 DE6F77404A; Thu, 30 May 2024 19:14:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717096465; cv=none; b=SW9JUO3julmq412PuDzVLcMTCPBHaifQ3PzlDzcbBD/yzb+R9rizxKufoyI+tZQSs+O9MvinLBXOxkKurRwFcOrzFF4BuSDG2qRuYQgEwmhbJ2CV9fBLDtDNguXH8XNOvjSzNsk5tVwraUQXCB8w7VAG2zqCm9unHLZsoUx/IDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717096465; c=relaxed/simple; bh=bTZetfqb1NfzJHtwqCZfewEzdYTNjg6XvxSMuxbnkGc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d4W9Mj5wr2kzdF3izVEnXraQLL8eMpURhiou1f5ueFDbWYWNbaE1e4LtH/hpKb3y+3peI7g56CmWCvXDZynj1eYBSC/SxJCxZ9R3j84Lj9LX1+dZ1dPKYfUBEMh8YM8WNTfo35UzTn+GWVufktPp5KLKxbuova/RdrAnOEG6Szs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=DO4NWRG2; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717096463; x=1748632463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bTZetfqb1NfzJHtwqCZfewEzdYTNjg6XvxSMuxbnkGc=; b=DO4NWRG2xlPWOsLdlQwZjWVwfk/BaiG01MGk+oEf0D+H89Bu6AZoeyMB caCU1K6Bxn0793FAIxw3AmlKyL3JFIhN9wmVJr+KMOqXHKB3wOqUVlu+m +SoYPySxPP12ArcGgxD9so/7bI582snlg0bbNKVH58FibsRTOCPer6Err glI8WjeaQ3NPmyiOcIVz/utjB6AAeAhMFXI4D6S3/xfdEOte6pGEvZmG9 rvEGEnud8y1I0H4rJHXl9G8XvwX7cstKg379XA6MiwQSMCEnWXhH3Y7NG EiakMI5WO/qjhi8mTOF9ZWldxY8KP6LwqQQpmE08INw/auVxqtdeY1plW w==; X-CSE-ConnectionGUID: qs+WE00TRSuDYymwVHbIcQ== X-CSE-MsgGUID: 1HMUi8svTLaMu83gz9CfmQ== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13373173" X-IronPort-AV: E=Sophos;i="6.08,202,1712646000"; d="scan'208";a="13373173" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 12:14:22 -0700 X-CSE-ConnectionGUID: WNpwOOQSQ2u3u49/nHmUzg== X-CSE-MsgGUID: 5s+sYH/mQRu/+KUFg0QqsQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,202,1712646000"; d="scan'208";a="40362460" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 30 May 2024 12:14:20 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id BB9A337D; Thu, 30 May 2024 22:14:19 +0300 (EEST) From: Andy Shevchenko To: Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko Subject: [PATCH v2 2/2] gpiolib: Show more info for interrupt only lines in debugfs Date: Thu, 30 May 2024 22:12:30 +0300 Message-ID: <20240530191418.1138003-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240530191418.1138003-1-andriy.shevchenko@linux.intel.com> References: <20240530191418.1138003-1-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: 8bit 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. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko --- drivers/gpio/gpiolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) for_each_gpio_desc(gc, desc) { guard(srcu)(&desc->gdev->desc_srcu); - if (test_bit(FLAG_REQUESTED, &desc->flags)) { + is_irq = test_bit(FLAG_USED_AS_IRQ, &desc->flags); + if (is_irq || test_bit(FLAG_REQUESTED, &desc->flags)) { gpiod_get_direction(desc); is_out = test_bit(FLAG_IS_OUT, &desc->flags); value = gpio_chip_get_value(gc, desc); - is_irq = test_bit(FLAG_USED_AS_IRQ, &desc->flags); active_low = 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), -- 2.43.0.rc1.1336.g36b5255a03ac