Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4304925pxb; Tue, 2 Mar 2021 11:34:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJygfmHhcIUHJa7RdFIAlM5UGVYO9jlMiJcK5RHnr6KYk6UJl1INJurNHQ8lZsidzp6AZQJv X-Received: by 2002:a17:906:4410:: with SMTP id x16mr22483031ejo.446.1614713642376; Tue, 02 Mar 2021 11:34:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614713642; cv=none; d=google.com; s=arc-20160816; b=VpGz1ziP9a0BWN19CdadmSxQewy42SRyt7MB/BuUTWuoPwPfnH+elZ3/xpW0DVSdaO 4f+xwV7YU61cdWbcZUxPbB14ZcKXQ/LrkxZV13cs1NwVHB9XxyucFiHv6n+F5E99MFIp EyLEOCpG5JOAAUtMh29ecXSlGRRWk/HnWZYGDJ2pW0jvkogWlaQMXiy3qNqxSO+BPMYl Gdy1ezc3/GTdGYmHykXrU2Ui4cLohwKotOPcc39njopjbuqegf50NvDZr35xJJSLWPIr ojcs7BCBErPdMaf7d4G0CMdf/UJrhpLFuf7o5Dhmt2egzAjPpb/JswULEaVlM7xwlQXV NJfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AND5hR7g+etm8p1XQXNCrrPsiiY+ufosQMI5JJrzRVE=; b=PiiGpMwKhGlWJWhfvoTXCi82xX6BEibkApVqL55/wDYAclOKbcF3i3X7JUKOqBzzcz BZM5Q+MseL/PTu45CoxCT2AJEDMbuoQHQmXzvon6Ouk4wdkPYI+C7KYPjTgBTsTE2J0I qF/m9ZFb4SrGiFM25BmOB58rpp+b88kv2zAaXj2TSFssn7X6Vada/W32idfyLblFbc4p 2hiI2tmxWiufl8eFu6WvgAlZE+B5J7hxUrAhJMm1bhcsKYHbBX5qgSjhesBDzDy0e1nQ qjwYfMSyCixr58Z1L2owWIjCuxj3DgqGgs1+D5kds7AKB33EbEjZP8k/I0OSPKrRJEQi 3YYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=K8lCA4A1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si3083392edx.355.2021.03.02.11.33.38; Tue, 02 Mar 2021 11:34:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=K8lCA4A1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349286AbhCBG62 (ORCPT + 99 others); Tue, 2 Mar 2021 01:58:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1576926AbhCBFfL (ORCPT ); Tue, 2 Mar 2021 00:35:11 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55421C06121F for ; Mon, 1 Mar 2021 21:32:18 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id i10so3933336pfk.4 for ; Mon, 01 Mar 2021 21:32:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AND5hR7g+etm8p1XQXNCrrPsiiY+ufosQMI5JJrzRVE=; b=K8lCA4A1uHoty55BpP30fhzuelUH2422FzM5XyB/82aEOA5s8Jc2Pgs1pEWiBARHZJ BQl/rNrns8TZZ3ExaMbFs9OZ5/1pqLO8alJmor3Sd7nfjHmpzqeM5cDtJEXy2Qi/309W 421xXN/4fvHLnYge+BcT9EoTKWNzKqc0SELYrRo3cU1QPhtfC7iqOzW1yVwOswg6ZDb7 zcjwnnD3DCiTlt7xxta+/eTAf3f3cXHfkmaTghgaoc+RGIjSKC+e9HUjr7OPFsoFS190 Ndf3AJb3ndkz+HcMgWIPB/dgvK9FxiS6OjhAOC0miRXWLZlistc5JY+uC2Krwokxad01 AV5Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=AND5hR7g+etm8p1XQXNCrrPsiiY+ufosQMI5JJrzRVE=; b=tSmgl6MaMfv2FHBj5QYawmyQmJJQSueXNgTxe8ds6MsvaqRIfdcydWUOWOo/Q1hzzn g8HzOmhWqhzwjtM/QnoeRKmU9nroYOmL2aiCvza7ET7JTgBd72kmgB7pqpzPgaelXciO 1PaS0Elc6j0+81DyBoNPZYk2ToRpsIv8WarOt42K85SGM3HH0ExdV2jOklw40u9yDnli N4SFgUzea+iyI2FHxwNWPw4QOdzh2myePWQyMZNxDBiSqUDOdsv96hHLvvRqmI8v3hxl WrQw9iQ6QtycrVcZChvjOULI2JIRuOLgn7vlCABzcmk1SoZy8tws89gIfTf8Sk7njVAF GlOQ== X-Gm-Message-State: AOAM530lthbCNlkHfX9TUYmV31UdFMYT5r5zB0MgIOz158wHYAAOpb8D HEfbWMvZC2TrGDzZenUp0r2YxA== X-Received: by 2002:a62:804a:0:b029:1e7:d747:de3 with SMTP id j71-20020a62804a0000b02901e7d7470de3mr1888106pfd.38.1614663137892; Mon, 01 Mar 2021 21:32:17 -0800 (PST) Received: from x1.hsd1.or.comcast.net ([2601:1c0:4701:ae70:37ab:7b44:a136:e385]) by smtp.gmail.com with ESMTPSA id o129sm17929757pgo.27.2021.03.01.21.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Mar 2021 21:32:16 -0800 (PST) From: Drew Fustini To: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Lindgren , Andy Shevchenko , Alexandre Belloni , Geert Uytterhoeven , Pantelis Antoniou , Jason Kridner , Robert Nelson , Joe Perches , Dan Carpenter , Jonathan Corbet , linux-doc@vger.kernel.org Cc: Drew Fustini Subject: [PATCH v9 4/4] docs/pinctrl: document debugfs files Date: Mon, 1 Mar 2021 21:30:59 -0800 Message-Id: <20210302053059.1049035-5-drew@beagleboard.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302053059.1049035-1-drew@beagleboard.org> References: <20210302053059.1049035-1-drew@beagleboard.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Document debugfs directories and files created for pinctrl subsystem. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Tony Lindgren Signed-off-by: Drew Fustini --- Documentation/driver-api/pin-control.rst | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Documentation/driver-api/pin-control.rst b/Documentation/driver-api/pin-control.rst index 3d2deaf48841..c905b273e833 100644 --- a/Documentation/driver-api/pin-control.rst +++ b/Documentation/driver-api/pin-control.rst @@ -1428,3 +1428,40 @@ on the pins defined by group B:: The above has to be done from process context. The reservation of the pins will be done when the state is activated, so in effect one specific pin can be used by different functions at different times on a running system. + + +Debugfs files +============= +These files are created in ``/sys/kernel/debug/pinctrl``: + +- ``pinctrl-devices``: prints each pin controller device along with columns to + indicate support for pinmux and pinconf + +- ``pinctrl-handles``: prints each configured pin controller handle and the + corresponding pinmux maps + +- ``pinctrl-maps``: print all pinctrl maps + +A sub-directory is created inside of ``/sys/kernel/debug/pinctrl`` for each pin +controller device containing these files: + +- ``pins``: prints a line for each pin registered on the pin controller. The + pinctrl driver may add additional information such as register contents. + +- ``gpio-ranges``: print ranges that map gpio lines to pins on the controller + +- ``pingroups``: print all pin groups registered on the pin controller + +- ``pinconf-pins``: print pin config settings for each pin + +- ``pinconf-groups``: print pin config settings per pin group + +- ``pinmux-functions``: print each pin function along with the pin groups that + map to the pin function + +- ``pinmux-pins``: iterate through all pins and print mux owner, gpio owner + and if the pin is a hog + +- ``pinmux-select``: write to this file to activate a pin function for a group:: + + echo "" > pinmux-select -- 2.25.1