From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-a3-smtp.messagingengine.com (flow-a3-smtp.messagingengine.com [103.168.172.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1FB2126C03; Wed, 1 Jul 2026 08:32:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782894740; cv=none; b=iSNRVIMYChyKjO/xwzmfRVUnH4lNGGfRIV8689Y6OKHaXKAn/0eGm2itr3SyKAaxmqemW+xsfScIs4WXTDgiQSrA6yCJALRq2Lh/IepQw0YEuELaAFUtGH11eOlf5yEgrOeEWIb3y50XRCth9sy5CDCod5COyiflnQEFZfWyT6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782894740; c=relaxed/simple; bh=ue4wzFqFJKqL2WfmlTkgjVeQXRsUBYlyz2PcQ/gXSIw=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=mf33lmYuMt58EIBsyDzKPmOcx1Te6e+NgDoA713c6rJpD3Ly8bF4NBC4mR8jvP8lzi6kg5c786SjJ/fGiBkXKX/I0c9OXK/GmXRfbomBZfVvfdHAqLO+MmFL36voEHViYiU3E2TxQghfAdZwwsvDxubIrZyl3vXCvib6VcJrrvU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=pk4AtDVr; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=aPVd6uLE; arc=none smtp.client-ip=103.168.172.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="pk4AtDVr"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="aPVd6uLE" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailflow.phl.internal (Postfix) with ESMTP id 10A071380095; Wed, 1 Jul 2026 04:32:19 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-04.internal (MEProxy); Wed, 01 Jul 2026 04:32:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1782894739; x=1782901939; bh=VCjnwi8QfYnO+8yzfpol694kVs5T+6OkOnlzLTl6vgw=; b= pk4AtDVr7X0Ga3ZeWprkuDgz4D0ADwYPDjiF6dJpeDjRBJwKFomQfgV1i2cUPfwS YGG7oxHtxzxWOI/oCF1vTenXM/Bxnl+jzvqa2o4Uav3luge6v1KsVb0Z58Ux10SH ihh0bvVj3hWOmrddUlZbKOAN4x35MKqgbBPgbBV3RnkOt941tQlZLmtzA0NS1gVa wZi+BX1NBKmJrTAwiAoLRjtW42OtB7SEAhpJrWi1lBjP1k7jAL8lyCFZnVDg89+r yq3ugkbXbTZjzlXrAoPV90L435jnotEuAcLSM1fiUThBWAv5FA+0Gj5gsyx2KLQ7 ZckqFzlkSmSQZ4fn81X3Mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1782894739; x= 1782901939; bh=VCjnwi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S1D0HPb/YWgaYMdL06KmwXiqQ X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 1786E182007E; Wed, 1 Jul 2026 04:32:18 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: A045QOfflcQ7 Date: Wed, 01 Jul 2026 10:31:37 +0200 From: "Arnd Bergmann" To: "Geert Uytterhoeven" Cc: "Arnd Bergmann" , "Linus Walleij" , "Bartosz Golaszewski" , "Marcel Holtmann" , "MyungJoo Ham" , "Chanwoo Choi" , "Geert Uytterhoeven" , "Andy Shevchenko" , "Dmitry Torokhov" , "Ulf Hansson" , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, "open list:GPIO SUBSYSTEM" , dri-devel@lists.freedesktop.org, linux-i2c@vger.kernel.org, linux-iio@vger.kernel.org, linux-input@vger.kernel.org, "linux-mmc @ vger . kernel . org" , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org Message-Id: <72746bd8-8ba3-4369-a2e9-60795f183813@app.fastmail.com> In-Reply-To: References: <20260629135917.1308621-1-arnd@kernel.org> Subject: Re: [PATCH] [RFC] gpiolib: introduce gpio_name() helper Content-Type: text/plain Content-Transfer-Encoding: 7bit On Tue, Jun 30, 2026, at 18:01, Geert Uytterhoeven wrote: > On Mon, 29 Jun 2026 at 19:54, Arnd Bergmann wrote: >> On Mon, Jun 29, 2026, at 17:29, Geert Uytterhoeven wrote: >> > Same results for instantiation using sysfs or configfs[1], although >> > the latter does have optional support for specifying the name. >> >> I wonder how many of the other instances have the same problem >> then. Would it be appropriate for gpiochip_fwd_desc_add() to set >> a name itself to address this one? > > I don't think it would be appropriate for the GPIO aggregator to set > that name. What we want to print here (for debugging) is the physical > GPIO that an aggregator's GPIO is mapped to, not some consumer or line > name (which is not guaranteed to be unique). Ok. > E.g. "." would be fine. As gpiod_name() can only > return a fixed string or an existing string, it can't return such a > formatted string, though. And consumers don't have access to chip info? The gpiod_hwgpio() function is exported to consumers, so they can already print that instead of desc_to_gpio() if the local number is sufficient. If we really care about the portion for any of the debug prints, we could export another function that returns maybe gpiod_to_chip(gpiod)->label or dev_name(&gpiod_to_gpio_device(gpiod)->dev), which are both constant strings we can print. It looks like we can also replace most of the remaining callers of desc_to_gpio() with gpiod_hwgpio(). Arnd