From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0353B30BF52 for ; Fri, 13 Feb 2026 22:32:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771021947; cv=none; b=JHGKYz1fB63jTGsGO+21Zdbw9AQFerWm/1CeiPC9rc20fgCD/NI3p45a0lV6Zvy/58WhOQBk5VOePrlBM6/bGTY90kOoYcMvdR/7MGHwIP5Sn+JItq7w11Ieb2iNd8Y9/Xl1HkbnCqNMIuSKAHx/1Jo72ZhKBRVRGq+WyZ3hlMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771021947; c=relaxed/simple; bh=q7Fqxy6e28lycA/LVu+rFivt886Ak4SzXlJ0a8MnRFU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lUjuLPv0cqKR8xVb47n6CGzhOJzXu11hK2ziOZpcE7tt007J2xrb4aoRKQ2IuLzAXf7NmMQWbgcKYm4hqrFBcDZ89Sinwj8Ia8rR+lDfAqMQC/r9hc83cmPq1lxWe4sAGSINabrfcsV97YYuCV6UNxoBdnvrPYGgzk7kbBi1DkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XdTaxu1V; arc=none smtp.client-ip=209.85.167.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XdTaxu1V" Received: by mail-oi1-f193.google.com with SMTP id 5614622812f47-463208653d6so974654b6e.3 for ; Fri, 13 Feb 2026 14:32:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771021945; x=1771626745; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pOA3Fq3qeW/ssDTBL2Z818pHx95UW3MtdV2Mwb98UGY=; b=XdTaxu1VmPYH1rxhp8+a1pS3xM8rJAQZfndOCRgCPKigyXexENG7mdFqY2kvO6Tx8N T2cxeuvh5xDXV0HpxKKyKLSPVs+OeOEj9fQxqtygY7KfBltz9Hz8rRpp6p4xSISKLfK2 b+ET300jcGoX5jf50tvMOpavQ+M3FOTLrxfeI8PSb/ndkRtA7X6M49HbDAi119eeUY7T iQBDWx5yh9QLgozhk5vcLqgSE/Xu3YXinIO/Ife0PNi9CWOg2OpwXslG/K5l/uokdLFr NmdNTCmGdNBD+moZZcST3iXJaqmhpDNqWGVDCdJ6wGahdENGRPMc2GYsRUIVx0dsdINm fIoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771021945; x=1771626745; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pOA3Fq3qeW/ssDTBL2Z818pHx95UW3MtdV2Mwb98UGY=; b=BYt9tQla/KRwZ6hG8WXFnc+kE+FJnBWOo8XPWY0DuGRyG1Fsln4UVvR1vc2NwxihSV KyI+Vf4ZIqsE58DfkuFIZcznyvB6sPtEAcuTIAAnlL/OdHXCAfX8z2cAzfzwTmyEV6sn 9+K/CbdZUVYFgs/sZ2VqhgxAbruGWD0EdRYvQLpxUdo/2/VCWb7dipEl6YxopKUP8ddd IK3+9quGg581+eA2vMC/g5+WfO2+2oHViQC7+gWQg6tTbLbFPJ4HTggwG8IOJ2O1sz51 S2PEvBIHqRtxdSyrkyw+WysLyxBaldAD/FBJBa0jQrslzM1zjlgDQmRuVwy/KrMdD86y ucug== X-Forwarded-Encrypted: i=1; AJvYcCUMz+uI9Khh8HSZgg+K5gvPAk1tem/lc4fsDzY5P+cq/jdTcX59AIq7Q2Qxnb2wZBlmlZhW8g/aeggUDuo=@vger.kernel.org X-Gm-Message-State: AOJu0YyUwXY/tjl7QQjkDhlwuNdHdilYzRTGMH2ZM4BAg8wq48FBVuB7 WUE93S0hkTvIGjDnxi9lNKRqkeiZ8NlsbSI/3Yurxz/uhQOJgY2YrM0x X-Gm-Gg: AZuq6aKVJCU36q2f33d1SJBYPiwsyKTuwZX7A3IC8dRoDssJwf100aM63AhogAYwtez cXLGBItjAqLVqG160mzGEksP7KKT+00PV4ECirUO+bFAmlxB7n0/BCiIXXb7BbozVbiM/KeTNxh CJIKOALqgp1EZz9hScMpIprDSLM+9brdQgqsIxIbU7/rsVuRrvGhxR+CaCH1UGPAIwxB8sVJKVa docA08i7MSx4RLXW7KtS7kgGP1nb0Jk+KAMA74tha5RJ3uAOeEIut7l5sOcB1o+1zMgtrwVObIC UYyqkLwB7aqhu3VRC6tz3SwVpK6pSqEGrRmtGIosBTVRzw874nHWK2xQcCSrLhyjT7YfNT/bZUS FUch8SXY9zZa4FRK3J/FaduhHvOqlntJVXxiePka4H3WP3TpHoKiEdEdtA5jsQZ5SbYI4J3JSa0 E9J08vVNURg3cEEz0HKnePbhKPIGuEwy5l0lw3cTZjm8DUUQvpKqe+x1TnEYDX1cteyzd70exhj ZIA1u/hc7DqHSUJv7OaME0efWRVqYluJ9Bt6etvDIZUalPBp9U74DZJH/GLKFo= X-Received: by 2002:a05:6808:c18e:b0:450:d143:b79f with SMTP id 5614622812f47-4639f281395mr1478351b6e.66.1771021944958; Fri, 13 Feb 2026 14:32:24 -0800 (PST) Received: from james-x399.localdomain (71-218-105-26.hlrn.qwest.net. [71.218.105.26]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4636b0c8606sm5446923b6e.18.2026.02.13.14.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Feb 2026 14:32:24 -0800 (PST) From: James Hilliard To: linux-gpio@vger.kernel.org Cc: James Hilliard , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] dt-bindings: gpio: document gpio-line usage Date: Fri, 13 Feb 2026 15:32:02 -0700 Message-ID: <20260213223204.2415507-2-james.hilliard1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260213223204.2415507-1-james.hilliard1@gmail.com> References: <20260213223204.2415507-1-james.hilliard1@gmail.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 Document gpio-line child nodes for GPIO controller initialization without line hogging. Describe gpio-line-name semantics for both gpio-line nodes and gpio-hog nodes, and update examples accordingly. Signed-off-by: James Hilliard --- .../devicetree/bindings/gpio/gpio.txt | 47 ++++++++++++++----- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt index b37dbb1edc62..cf591954eafd 100644 --- a/Documentation/devicetree/bindings/gpio/gpio.txt +++ b/Documentation/devicetree/bindings/gpio/gpio.txt @@ -199,28 +199,41 @@ gpio-controller@00000000 { "poweroff", "reset"; } -The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism -providing automatic GPIO request and configuration as part of the -gpio-controller's driver probe function. +The GPIO chip may contain child nodes used for line setup at probe time: +- gpio-hog: reserves the GPIO line as a hog and configures it. +- gpio-line: configures the GPIO line without reserving it as a hog. -Each GPIO hog definition is represented as a child node of the GPIO controller. -Required properties: -- gpio-hog: A property specifying that this child node represents a GPIO hog. +Common properties for gpio-hog and gpio-line child nodes: - gpios: Store the GPIO information (id, flags, ...) for each GPIO to affect. Shall contain an integer multiple of the number of cells specified in its parent node (GPIO controller node). -Only one of the following properties scanned in the order shown below. -This means that when multiple properties are present they will be searched -in the order presented below and the first match is taken as the intended -configuration. - input: A property specifying to set the GPIO direction as input. - output-low A property specifying to set the GPIO direction as output with the value low. - output-high A property specifying to set the GPIO direction as output with the value high. - -Optional properties: -- line-name: The GPIO label name. If not present the node name is used. + When multiple line-state properties are present they are scanned + in the order shown above and the first match is used. +- gpio-line-name: + Optional GPIO line name for the configured line. + When present, it sets the line name for that line and overrides + any existing name, including names assigned by the controller's + "gpio-line-names". If not present, any existing name is left + unchanged. + +gpio-hog specific properties: +- gpio-hog: A property specifying that this child node represents a GPIO hog. +- line-name: Consumer label used when requesting the hogged GPIO. + If not present the node name is used. + This is independent from "gpio-line-name". +At least one line-state property ("input", "output-low", or "output-high") +must be present for gpio-hog. + +gpio-line specific properties: +- gpio-line: A property specifying that this child node represents GPIO lines + to configure without hogging. +Line-state properties are optional for gpio-line. +When no line-state property is present, the line direction/value is left as-is. Example of two SOC GPIO banks defined as gpio-controller nodes: @@ -235,6 +248,14 @@ Example of two SOC GPIO banks defined as gpio-controller nodes: gpios = <6 0>; output-low; line-name = "foo-bar-gpio"; + gpio-line-name = "foo-bar-line"; + }; + + line_c-init { + gpio-line; + gpios = <7 0>; + output-high; + gpio-line-name = "foo-baz-gpio"; }; }; -- 2.43.0