From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f54.google.com (mail-dl1-f54.google.com [74.125.82.54]) (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 9BEE5340DB0 for ; Thu, 21 May 2026 05:13:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779340429; cv=none; b=pEt8b1cL4H4xrm6sabqV6lCMvzUPhhkKZqUWrKPQEwg4KB5ksM7//rN5VZYm0gHNP5KpLoCNazDFKMxQ9I76HFgjymEhw03uUVixweV6xkzAphuMVhwDGlLCHWIPp5e7TR/YebizTHT7TLOl22Eg+LxEUiUrGACCHRWNoEcclhk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779340429; c=relaxed/simple; bh=V98m1+0octd7GZV73B+kVvkgTFXAFAq4EIFfr2kWVpM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jy7oNveGzfBnTYSI7KveYVYLWHyZXaNbCb492d4MkKl7cSP8VZNgP1DLTs1HNXce/SGCu9YrhusPjBzSwtAYRqyaHc5xQzq4yhF6aOwDNe+IHDTOyOXeevEDiMvmgQwoi3pvNr5JxpOvAHq/ljRvoi8FWCFuQOnAtAOE2mKANVg= 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=MKCAnqrD; arc=none smtp.client-ip=74.125.82.54 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="MKCAnqrD" Received: by mail-dl1-f54.google.com with SMTP id a92af1059eb24-1363fe80fe8so80221c88.0 for ; Wed, 20 May 2026 22:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779340427; x=1779945227; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=15uEAzMKA+H+ojfSPLhPEYofIvVWsChvdMIoi7uyS4E=; b=MKCAnqrDQumeqPf4dUOm7UyA6t7soduqP0W8TOu6ifpHPQcL7HTheY6B2DwCoJw7El fuFkg2izs1bl7oou0tZkHA++ESd+r+BWHiv/UkxQeio/jeGYEE+cIDKKvpBeG+Q7FL1r /F+oyaxM7YldPdQkmAEIYEJl+dRUUVAK0/QKArcJ2uqsnKNTUOOx+BRKjbUvlKds7jg2 01t2zB8M57xQXaomVRiMucRFY83LM5u8utNh0W/ZhaSAPXK/doG0VOtL7wloJwqV5eQX wfL6omkbl8RgBYD7ke50m/HB2sLi8IEY7br+bSIu1u6X2M4bYpxjXMQpiK/Gu6Ao3/9N lBgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779340427; x=1779945227; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=15uEAzMKA+H+ojfSPLhPEYofIvVWsChvdMIoi7uyS4E=; b=GZJqnLwkVrG+Muvg4U2rJwZbbT36U1KDMjEhREUkcH40dwOJgKDcZK3DI7ld3gGzYL wVHcEuUHQ/D2tfRpGllC8VNrdLizqJOU+CMFVA9iKVnfhAA4M7+RyMtQZWgu+LRb034v hht/H9jmTp59E9nDk+B+WuB5BU/1NGiJvVIzOlKMWkTMaSrb6A6xJd+FlOthSdKN+fGR 6hN+gySxTa9KOfhWLOQpXxpMUTrja0Fyvxggm/xigJ8mdGt+4YWBsDebNMUYHIjJa6Fo l6/21vxEAdqFH7T9zMX2H1eBHqe7QqzTC1bIxI8tHB0LdhClXkqsA+Aj+Z1x2ut1fO1L G3rQ== X-Forwarded-Encrypted: i=1; AFNElJ8Ri3qMO3jgAG/Vvho3zQzwlk7/0idIvDNaUVo2yYyZySCnSermCX4Ekw+4YO5PxeRfx1ZULJaMDRqWk7s=@vger.kernel.org X-Gm-Message-State: AOJu0YwKYo3GEiXcbjZKsR0KFxGnggfwvSKodak1+pt4gPk+s8kt9Ucs d45CNgQUFxFwkKs1RvfBcxLx8XOReazJOEo4o/Lq5nLEdIj+YdsguaT6 X-Gm-Gg: Acq92OE3cJ5sHpk+Wqo74o6gVC9MnhyOB95UBZ0ma7f7wK4ctZorBrb/GLdPcdn7Rdg ePGg7Bq/hjAk4sMobNHOPR4zrrj2QbyZmirC8WCCWmdZpRifksQZMjZSgs8sphRoLVyd21u+rfx Up94OyOkvv0IWWI/mBhu1xE8eUBELb/Eh7srQRLCMeOCsNhCkkRJHA8T5n4bwLGHmAmMTalyi8S NImwwVPOAFgeEsph+XcxS81glbBGAgjFk3IvmhNl2nDrDphcWY+BqOLe84+iLHRHsRgIn1IXXfM Hga1m6e/bOIg9aqWKQVt/250XWwm6EIGyvw7K9dIIhpt1j3+OQf2Ciu3xNTdi1HlfPHtox0cnAB ZnoBbXABYhe6Ih4XwWQxRRUmRYmNcf1+Vbk19ak/wKvx1CysfnvPG9HcUOSagsL8py0Gt3TZeRf pLv0kHlt3ldnZoOiN8R42B557ZJER/oSir/NzfzQsAeLXEdZXYqgiatvpgs6ecy0g5cj1eosfxG ik9lI6xy/EuTw== X-Received: by 2002:a05:7022:f305:b0:12a:6c7e:bef2 with SMTP id a92af1059eb24-136327e4b6amr342425c88.7.1779340422089; Wed, 20 May 2026 22:13:42 -0700 (PDT) Received: from dtor-ws.sjc.corp.google.com ([2a00:79e0:2ebe:8:d457:597:d576:1eb8]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-135e5c0a918sm6231360c88.14.2026.05.20.22.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 22:13:41 -0700 (PDT) From: Dmitry Torokhov Date: Wed, 20 May 2026 22:13:17 -0700 Subject: [PATCH v2 1/5] pinctrl: renesas: gpio: isolate function gpiochip from parent fwnode Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260520-rsk7203-properties-v2-1-465f3308021b@gmail.com> References: <20260520-rsk7203-properties-v2-0-465f3308021b@gmail.com> In-Reply-To: <20260520-rsk7203-properties-v2-0-465f3308021b@gmail.com> To: Rich Felker , John Paul Adrian Glaubitz Cc: Yoshinori Sato , Geert Uytterhoeven , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Arnd Bergmann , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org X-Mailer: b4 0.16-dev-6911d The sh-pfc driver registers two separate gpiochip instances: one for real GPIOs and another for function GPIOs. Since both share the same parent platform device, gpiolib's fallback logic causes both chips to share the same firmware node (fwnode). This causes ambiguity when using software nodes to describe GPIOs, as gpiolib may apply hogs meant for one chip to the other if they share the same node. Explicitly set gc->fwnode to ERR_PTR(-ENODEV) for the function GPIO chip. This satisfies gpiolib's check for an existing fwnode and prevents it from falling back to the parent device's node, while ensuring that no actual properties or hogs are found on the function chip unless explicitly assigned later. Assisted-by: Gemini:gemini-3.1-pro Signed-off-by: Dmitry Torokhov --- drivers/pinctrl/renesas/gpio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pinctrl/renesas/gpio.c b/drivers/pinctrl/renesas/gpio.c index 2293af642849..4e59dadb7364 100644 --- a/drivers/pinctrl/renesas/gpio.c +++ b/drivers/pinctrl/renesas/gpio.c @@ -278,6 +278,12 @@ static int gpio_function_setup(struct sh_pfc_chip *chip) gc->request = gpio_function_request; + /* + * Explicitly mask the parent's fwnode to prevent gpiolib from + * reusing it for function GPIOs. + */ + gc->fwnode = ERR_PTR(-ENODEV); + gc->label = pfc->info->name; gc->owner = THIS_MODULE; gc->base = pfc->nr_gpio_pins; -- 2.54.0.669.g59709faab0-goog