From patchwork Thu May 3 09:19:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 10377409 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D7454603B4 for ; Thu, 3 May 2018 09:19:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB77B28F51 for ; Thu, 3 May 2018 09:19:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE32B28F5F; Thu, 3 May 2018 09:19:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61D1228F51 for ; Thu, 3 May 2018 09:19:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751054AbeECJTc (ORCPT ); Thu, 3 May 2018 05:19:32 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36222 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898AbeECJTc (ORCPT ); Thu, 3 May 2018 05:19:32 -0400 Received: by mail-wr0-f194.google.com with SMTP id f2-v6so4981913wrm.3 for ; Thu, 03 May 2018 02:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eYdS+iT/epXqnKve3RPBG2LqUhNoTYtXvYhmRFCbXfw=; b=QpjLzx5Bw4XcG/3aENHnWtv8u6xYRauhAl8HSeVvAI+AyD4noAUpBKYCxP8xiyb2pG 8Sra2mIfeix+9ckprAVaYeEXVSUe4S23VxkOovh4/QdrdgRb7S5b3YArymvPcpr4CNmu q6E25EBbf7S7/wfWRD/oS2/wgt0hLYUzEtj771n2TitCyv0ZafDxZIbT/lyitUMqRBek kKWkEgeMW93ZJgJ7ITDITHSLvpPxoVltFllMGA2XBuQfDWSlJ7aqEGIBtfClH9OX5v6H 6bDIDgQKJipvR3uXM8mDtFDU0HBMrg7nNMz34WMvZ4gWh6Yr+rAZqyzxY7LIhj3M3daq IaUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eYdS+iT/epXqnKve3RPBG2LqUhNoTYtXvYhmRFCbXfw=; b=cJ2KO7qnWR4kh0eWdZaf4FoJAX7ev3cRCQGtkLfHOnOkPteQVazb++I5mPMfmx4Py9 T4G5klhL01e03maY/uS4bDODl/mUsUconYIWvcwPP9I6IfEEYTAPJXl8qrxaDfjAYq9T lV/yMxFwUX+GutQ7KFlmWKW0VCanZzF4iUuJOsoZ14J5qqCi4fAZfB5tCPdHS6nwd64n x+OsxLY9ONSF1AdOy9vQiNfg635BRPt/GY0zsWSUYYXteEqKiX7tzasjDCKSW7RvOCEI C8d/0RYaiFft3QFKZqpiajPS1VCIS30HwGRI5upQgCX5WUrV9zAXvr/SAr19QXYULXe0 tfTQ== X-Gm-Message-State: ALQs6tAX6I45ricbMA0s/c1CRw3ACeg9g4Xv+3cl8Z50VrL3az8rig34 RM53BmejMei1h1V3qJuIZiBxbQ== X-Google-Smtp-Source: AB8JxZp/dl61RiNp9xo+h2Njus6GbUNog76PJGYyRYvvzKI7M9NVp4nnhJGho61O9pA7nTSPWhxwCw== X-Received: by 2002:adf:e0d2:: with SMTP id e18-v6mr18557405wri.2.1525339170452; Thu, 03 May 2018 02:19:30 -0700 (PDT) Received: from cperon-Latitude-7490.lan (static-css-csd-151233.business.bouyguestelecom.com. [176.162.151.233]) by smtp.gmail.com with ESMTPSA id m64sm10694848wmb.12.2018.05.03.02.19.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 May 2018 02:19:29 -0700 (PDT) From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= To: linux-arm-msm@vger.kernel.org Cc: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Subject: [PATCH] pinctrl: qcom: fix wrong pull status display for no_keeper SoC Date: Thu, 3 May 2018 11:19:04 +0200 Message-Id: <20180503091904.28807-1-peron.clem@gmail.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DebugsFS strings about pin pull status for no_keeper SoC are wrong Fix this by adding a different string array for no_keeper SoC Signed-off-by: Clément Péron --- drivers/pinctrl/qcom/pinctrl-msm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index ad80a17c9990..84165f823c4b 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -508,13 +508,19 @@ static void msm_gpio_dbg_show_one(struct seq_file *s, int pull; u32 ctl_reg; - static const char * const pulls[] = { + static const char * const pulls_keeper[] = { "no pull", "pull down", "keeper", "pull up" }; + static const char * const pulls_no_keeper[] = { + "no pull", + "pull down", + "pull up", + }; + if (!gpiochip_line_is_valid(chip, offset)) return; @@ -528,7 +534,10 @@ static void msm_gpio_dbg_show_one(struct seq_file *s, seq_printf(s, " %-8s: %-3s %d", g->name, is_out ? "out" : "in", func); seq_printf(s, " %dmA", msm_regval_to_drive(drive)); - seq_printf(s, " %s", pulls[pull]); + if(pctrl->soc->pull_no_keeper) + seq_printf(s, " %s", pulls_no_keeper[pull]); + else + seq_printf(s, " %s", pulls_keeper[pull]); seq_puts(s, "\n"); }