From patchwork Wed May 20 10:30:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 48793 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F3D0821411 for ; Wed, 20 May 2015 10:31:25 +0000 (UTC) Received: by wizk4 with SMTP id k4sf18311943wiz.2 for ; Wed, 20 May 2015 03:31:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=jgMOG/NM22nzvGMmLRX+IJ/+e99t8nQTChcau2/Wy38=; b=aOI3lmkXfJyxe5httCM7WFX9tABv/gdsS4XxHPG/TVUpvAbmWQ6bRVQ6ENDc5sIppW dNRic4nv5n3nTTbGVAKV8YhaDGrLOiI59P5nL5s1uQdWlc2Bzp3S1Vi0p/6Rj+mExNJN kRgVdvc0udZojGnF0E9dskiOO9MNAn2OvqKcmsy3vi4D+R49uDLhe5kZ3/XIw0uHyz0P 3DfB2red+K605Cc24ziEshkyGZWWcAXo1RDLfHo+IzxYaG8RLMKN6Wb8ctFs7o09QQzR Ob8wi20q6Vicq7hU2g6HKSSIt2ZAHBwTJqZFIf9lJU6ts8JbBcnac97dLUbJikoxWhXr BRpg== X-Gm-Message-State: ALoCoQl6xh0/aFKE5K/1fdqrVaLo23HAaNxNkxNGloionHm+wIE51OnIErpioJjAQLeiqCR5Hmpn X-Received: by 10.112.93.203 with SMTP id cw11mr25926238lbb.0.1432117884984; Wed, 20 May 2015 03:31:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.8.171 with SMTP id dl11ls161931lad.55.gmail; Wed, 20 May 2015 03:31:24 -0700 (PDT) X-Received: by 10.112.13.98 with SMTP id g2mr25986135lbc.102.1432117884740; Wed, 20 May 2015 03:31:24 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id o3si10919813laf.40.2015.05.20.03.31.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 03:31:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lagv1 with SMTP id v1so67173510lag.3 for ; Wed, 20 May 2015 03:31:24 -0700 (PDT) X-Received: by 10.112.163.168 with SMTP id yj8mr25310094lbb.36.1432117884637; Wed, 20 May 2015 03:31:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1427589lbb; Wed, 20 May 2015 03:31:22 -0700 (PDT) X-Received: by 10.68.242.41 with SMTP id wn9mr61604961pbc.117.1432117881525; Wed, 20 May 2015 03:31:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oj11si25905776pab.88.2015.05.20.03.31.17; Wed, 20 May 2015 03:31:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753451AbbETKbN (ORCPT + 28 others); Wed, 20 May 2015 06:31:13 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:34838 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752560AbbETKae (ORCPT ); Wed, 20 May 2015 06:30:34 -0400 Received: by wgfl8 with SMTP id l8so47854550wgf.2 for ; Wed, 20 May 2015 03:30:32 -0700 (PDT) X-Received: by 10.194.172.130 with SMTP id bc2mr52575060wjc.85.1432117832705; Wed, 20 May 2015 03:30:32 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id m2sm2729471wiy.7.2015.05.20.03.30.31 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 20 May 2015 03:30:31 -0700 (PDT) From: Grygorii Strashko To: Linus Walleij , Alexandre Courbot Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Grygorii Strashko , Johan Hovold Subject: [PATCH v2 1/3] gpiolib: debugfs: display gpios requested as irq only Date: Wed, 20 May 2015 13:30:21 +0300 Message-Id: <1432117823-1834-2-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432117823-1834-1-git-send-email-grygorii.strashko@linaro.org> References: <1432117823-1834-1-git-send-email-grygorii.strashko@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grygorii.strashko@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Now GPIOs, wich are requested as IRQ only, will not be displayed through GPIO debugfs. For example: # cat /proc/interrupts CPU0 CPU1 ... 209: 0 0 4805d000.gpio 11 Edge 0-0021 # cat /debug/gpio ... GPIOs 160-191, platform/4805d000.gpio, gpio: <--- no info about gpio used as IRQ only here GPIOs 192-223, platform/48051000.gpio, gpio: gpio-203 (vtt_fixed ) out hi ... Hence, improve GPIO debugfs code to show such kind of GPIOs After this patch sys/kernel/debug/gpio will produce following output: # cat /debug/gpio ... GPIOs 160-191, platform/4805d000.gpio, gpio: gpio-171 ((null) ) in hi IRQ GPIOs 192-223, platform/48051000.gpio, gpio: gpio-203 (vtt_fixed ) out hi Cc: Johan Hovold Signed-off-by: Grygorii Strashko --- drivers/gpio/gpiolib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 59eaa23..399ce2f 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2259,7 +2259,8 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip) int is_irq; for (i = 0; i < chip->ngpio; i++, gpio++, gdesc++) { - if (!test_bit(FLAG_REQUESTED, &gdesc->flags)) + if (!test_bit(FLAG_REQUESTED, &gdesc->flags) && + !test_bit(FLAG_USED_AS_IRQ, &gdesc->flags)) continue; gpiod_get_direction(gdesc);