Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3972680pxb; Tue, 25 Jan 2022 00:20:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwI6xQWOP1/fkKp3UT9SwA20EvoKlvdf9H55w3uwp5byG+UPob0C/8uf7rgwItESQnaGOgP X-Received: by 2002:a17:902:b710:b0:14a:28ee:fe6b with SMTP id d16-20020a170902b71000b0014a28eefe6bmr17929336pls.119.1643098830989; Tue, 25 Jan 2022 00:20:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643098830; cv=none; d=google.com; s=arc-20160816; b=NyKhj0uAtR03tpaAvWNt28TOOmwPZBM91NLa+UUXiuCldK3YKm+YK7VZVDBr3gJAzD raNoG33GUiD8RU2jiH3sLmR9ZNqf26gpZOnXtnYZuJC6SlZXX0E3XabIJylxFmvTmOHc zqJL7WOLNhq4iBiDFLhON4Rtz1K2RhaD+A4tsId0nTC8nGnN6JLIkLjq4QVOpnnRDEiU NIkMUAL3qqSLDwj3qDHnYFO0byGUh1HmGNGQ36gqlWZwRXxQwuTfvZEt6BUm/rEHSBS9 hxIjVaYv9dFAzr6vegDcgzA/8NGxgilK6FKhay/JoXZFzbgQaIIpC6Ul5vyFTWeLs2Yi fD6Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BX1PAfp5w2wTJH1XdQnE0UAcbFa9Kb+suVtVOM5C7O8=; b=hfExSH0kNFnOukN8iukWrRqKGq/s3yuKMOFPnGwyHlGWwDjZlDdBuleU0hMFRWZjYs DKRTDysjIDOGX41lG5TxoqsKkFHdK8R+PA+q0A8x3MYnrAzBPN8UE6hmp9zdLEu8WJ3q pSnGJW18WNbp9/Zt9aNQBwyCfrOBjkagXKoccvQvgLrpYCVsjWyqpfWt9ogZiz2PQtMB Tg/rYJwzzsxT/z5A6Ou5KqzdTV30iW04eFhav+5rPahzyG/J76GR3lLCqNUM4nEJeFnD 1Y7EdtPMiCaT+vbgNhVglsC/hXyCkgjIl23DzqKw9+doSF5+Ebzy6B2tBwprFbGDuF4m Nt4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tOknDXBz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q2si17832508pfj.256.2022.01.25.00.20.19; Tue, 25 Jan 2022 00:20:30 -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=@linuxfoundation.org header.s=korg header.b=tOknDXBz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3412947AbiAYAiC (ORCPT + 99 others); Mon, 24 Jan 2022 19:38:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2364001AbiAXXqc (ORCPT ); Mon, 24 Jan 2022 18:46:32 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD7A2C034005; Mon, 24 Jan 2022 13:41:25 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7C50461491; Mon, 24 Jan 2022 21:41:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EEE2C340E4; Mon, 24 Jan 2022 21:41:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060484; bh=ZFkvLrbQuEXn14yPP2X0Q5NlzUl9AI4o2OqopNOvoAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tOknDXBzs0yWGCSsfb8nVgbaXKREO3zRsYJp+vShykxfJGkCih9BPXx8bFnF5B2NL WfB/9xlhZg6x1eshtMzZrTCScFoxTUaHeyaemW/a2Y1sXitkABxEilWgeRrP7qpyg+ M/IrF6JDFr6/0XhG3/qyNn4+rPgb+cajVSj71UnM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Keeping , Linus Walleij Subject: [PATCH 5.16 0963/1039] pinctrl/rockchip: fix gpio device creation Date: Mon, 24 Jan 2022 19:45:52 +0100 Message-Id: <20220124184157.658285320@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Keeping commit bceb6732f3fd2a55d8f2e518cced1c7555e216b6 upstream. GPIO nodes are not themselves busses, so passing rockchip_bank_match here is wrong. Passing NULL instead uses the standard bus match table which is more appropriate. devm_of_platform_populate() shows that this is the normal way to call of_platform_populate() from a device driver, so in order to match that more closely also add the pinctrl device as the parent for the newly created GPIO controllers. Specifically, using the wrong match here can break dynamic GPIO hogs as marking the GPIO bank as a bus means that of_platform_notify() will set OF_POPULATED on new child nodes and if this happens before of_gpio_notify() is called then the new hog will be skipped as OF_POPULATED is already set. Fixes: 9ce9a02039de ("pinctrl/rockchip: drop the gpio related codes") Signed-off-by: John Keeping Link: https://lore.kernel.org/r/20211126151352.1509583-1-john@metanate.com Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/pinctrl-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -2748,7 +2748,7 @@ static int rockchip_pinctrl_probe(struct platform_set_drvdata(pdev, info); - ret = of_platform_populate(np, rockchip_bank_match, NULL, NULL); + ret = of_platform_populate(np, NULL, NULL, &pdev->dev); if (ret) { dev_err(&pdev->dev, "failed to register gpio device\n"); return ret;