From patchwork Tue Aug 11 15:12:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 52316 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id A6B3322FEC for ; Tue, 11 Aug 2015 15:12:33 +0000 (UTC) Received: by wicja10 with SMTP id ja10sf25595312wic.2 for ; Tue, 11 Aug 2015 08:12:32 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=d8s/6LjD1K1LJX5JFj5SwnOBe/gIOvoJPpZSrKvU6c0=; b=Nv7BSGZovA7q6gFYC4oT3UEEygyaEAV0XadmTyldCw/wOP+SeT2q6kAUx/Zf7XLzPC EbbyONFUTXYQo7EoXZKCUZT5FPg+m9cqxBK9cwX8NbPr5fNGG2n+bkcrucTF4uokIOrI KJKC3CrcFb9fICPFlkFYduzUS5KHsBBrrfpKpD+BrjzweUDNsmGUt6AMqQHEkexqCIhN ImW5DH/fM8wPDRNNoZgWoOJRfd3s7mvgeeTGDpUS796kyza6XfWq+hepgz3BfHahCjTH kxBMnszsfobXdrLr+zhtPgITASTuCJQLts8QqIQxyg2W6qjrBckUnissiE4LCiYM/x1P JC9w== X-Gm-Message-State: ALoCoQmVBpVatfbn7azN9kY8ljs+XWEYs94sBG9zFSyFDLnW6/HkvNSMVbsXQF9kmWwPw3esj5RX X-Received: by 10.112.160.39 with SMTP id xh7mr8113958lbb.22.1439305952901; Tue, 11 Aug 2015 08:12:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.232 with SMTP id ap8ls245197lac.18.gmail; Tue, 11 Aug 2015 08:12:32 -0700 (PDT) X-Received: by 10.112.90.165 with SMTP id bx5mr23837957lbb.53.1439305952627; Tue, 11 Aug 2015 08:12:32 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id x3si1576257lae.20.2015.08.11.08.12.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2015 08:12:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbtg9 with SMTP id tg9so8238663lbb.1 for ; Tue, 11 Aug 2015 08:12:32 -0700 (PDT) X-Received: by 10.152.88.78 with SMTP id be14mr26674403lab.29.1439305952111; Tue, 11 Aug 2015 08:12:32 -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.7.198 with SMTP id l6csp2590023lba; Tue, 11 Aug 2015 08:12:31 -0700 (PDT) X-Received: by 10.66.174.174 with SMTP id bt14mr57431897pac.109.1439305951109; Tue, 11 Aug 2015 08:12:31 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si4049784pdm.52.2015.08.11.08.12.30; Tue, 11 Aug 2015 08:12:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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 S965124AbbHKPMa (ORCPT + 2 others); Tue, 11 Aug 2015 11:12:30 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:34715 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965117AbbHKPM3 (ORCPT ); Tue, 11 Aug 2015 11:12:29 -0400 Received: by lbbtg9 with SMTP id tg9so8237193lbb.1 for ; Tue, 11 Aug 2015 08:12:27 -0700 (PDT) X-Received: by 10.152.8.169 with SMTP id s9mr8219354laa.3.1439305947886; Tue, 11 Aug 2015 08:12:27 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by smtp.gmail.com with ESMTPSA id z12sm522640lbp.46.2015.08.11.08.12.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2015 08:12:26 -0700 (PDT) From: Linus Walleij To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linux-gpio@vger.kernel.org, Linus Walleij Subject: [PATCH] pinctrl: nomadik: reflect current input value Date: Tue, 11 Aug 2015 17:12:21 +0200 Message-Id: <1439305941-29948-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@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.217.175 as permitted sender) smtp.mailfrom=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: , Let us see the current value on the input line in debugfs. Signed-off-by: Linus Walleij --- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index 809d88445db5..ad43ea8fd67e 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c @@ -1012,6 +1012,7 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s, int irq = gpio_to_irq(gpio); struct irq_desc *desc = irq_to_desc(irq); int pullidx = 0; + int val; if (pull) pullidx = data_out ? 1 : 2; @@ -1021,6 +1022,10 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s, label ?: "(none)", pulls[pullidx], (mode < 0) ? "unknown" : modes[mode]); + + val = nmk_gpio_get_input(chip, offset); + seq_printf(s, " VAL %d", val); + /* * This races with request_irq(), set_irq_type(), * and set_irq_wake() ... but those are "rare".