From nobody Sat Nov 23 21:41:53 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BFA10CA6B; Sat, 9 Nov 2024 00:28:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731112111; cv=none; b=vC56IqRl1+H6wOfCvseQzPR35f+DQVCte6B9XNV4qwdZqoqqX8+Fq7gdezha/FZw5laY6ja5DeR06Fk53DszbKBna0wqIXt4Qc8K4MI2VscoaDb9B+2lWLHhKGkfLL7jeyQFAQUnlhGc4eULBTCj7N+gbdo5Qh8fNFeaSL/pOr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731112111; c=relaxed/simple; bh=C7SFj4q4lLbVbx3tVScA0zWrHnfokGjWtxuW3ZW984w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h8NKfiYcmXOky89JJcGVzodaPEzMP0qYb1c7euqHNNQ/YjvsRscyYqDuyGdBtl/fKj86SSu+ikPWKNN8+shGd0qrcwfvt+tsJ/U/MuHuEPc/X7oWvtJFFFeoQpXQh8qDTlvSOasS4jORJMag4Fj89nAg+Er8FFjSPCOpFdR1elM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ejaddrhx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ejaddrhx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4544C4CED2; Sat, 9 Nov 2024 00:28:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731112111; bh=C7SFj4q4lLbVbx3tVScA0zWrHnfokGjWtxuW3ZW984w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ejaddrhxiuI6LbManrPYzvNdJtUX5+WsYnFFqOdK2SzvKPBiuK15KyZpBSYXDuRHo dEBJflmyG5Im66K/Qd/fLtM90rWjEYxX28uLULVzb04PlS4h0yN9XnKyJtKR5cuk4i ut5PuNMJ0OhQiKePYM6PTDEdI77j9hopNaQYbx83oTpw0tjgR3RaYtuctcBNwErlXM L84FHUN+zOE8Up3ioQ04CCDdDzELSO8NpQZXpFrC+4QS/M5yJaG4IPqLcepXQ65q7J 7K0IYHy0IXVPOXw4bkUYdeJHobcRTxELnxNrmjG+zGY/fQWR6IU8+clPgd6jlbU3mF fiiWEzVaJDLZQ== From: Stephen Boyd To: Greg Kroah-Hartman Cc: Javier Carrasco , linux-kernel@vger.kernel.org, patches@lists.linux.dev, stable@vger.kernel.org, Neil Armstrong Subject: [PATCH 1/3] spmi: pmic-arb: fix return path in for_each_available_child_of_node() Date: Fri, 8 Nov 2024 16:28:26 -0800 Message-ID: <20241109002829.160973-2-sboyd@kernel.org> X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog In-Reply-To: <20241109002829.160973-1-sboyd@kernel.org> References: <20241109002829.160973-1-sboyd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Javier Carrasco This loop requires explicit calls to of_node_put() upon early exits (break, goto, return) to decrement the child refcounter and avoid memory leaks if the child is not required out of the loop. A more robust solution is using the scoped variant of the macro, which automatically calls of_node_put() when the child goes out of scope. Cc: stable@vger.kernel.org Fixes: 979987371739 ("spmi: pmic-arb: Add multi bus support") Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20241001-spmi-pmic-arb-scoped-v1-1-5872bab3= 4ed6@gmail.com Reviewed-by: Neil Armstrong Signed-off-by: Stephen Boyd --- drivers/spmi/spmi-pmic-arb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index 9ba9495fcc4b..ea843159b745 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -1763,14 +1763,13 @@ static int spmi_pmic_arb_register_buses(struct spmi= _pmic_arb *pmic_arb, { struct device *dev =3D &pdev->dev; struct device_node *node =3D dev->of_node; - struct device_node *child; int ret; =20 /* legacy mode doesn't provide child node for the bus */ if (of_device_is_compatible(node, "qcom,spmi-pmic-arb")) return spmi_pmic_arb_bus_init(pdev, node, pmic_arb); =20 - for_each_available_child_of_node(node, child) { + for_each_available_child_of_node_scoped(node, child) { if (of_node_name_eq(child, "spmi")) { ret =3D spmi_pmic_arb_bus_init(pdev, child, pmic_arb); if (ret) --=20 https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git From nobody Sat Nov 23 21:41:53 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 428B48C0B; Sat, 9 Nov 2024 00:28:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731112112; cv=none; b=LEIyn5d27t2wYZat2z6+NTC4gAfSzQmFrYNgdHJ3rsRRrpFNch5pNGr41vS4hhkhJVA80zmOyIuM3bKlsVAEp8jh9VSlo797VDdFEcLxncVQtHaJYn3pm/diZxZ8PJIBRfKx6agRmLElDhh1emFrNdKdcrtH++tJL8hEz8GwwZQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731112112; c=relaxed/simple; bh=IBNh7dabfqa0UK+cVMrAB06ypmHTvI7x+e/C8pdK9Do=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oytrdH0CBdOe1s5ngi8UsQnHtCNw2xSLvWMRd1cEY+L2Zxa+LZnbQBDQzrt2OrtRhLe7kHDF5uJ0FL6UjA+vXGQZuRZnipqDOK++fkQPispcbrDR3xHk/vYLJz3g8Lbv24Dgu+y0I2Gnt94s6q8/cqR+ffflAsJqJWOTlu+Ocg0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BgMiFkT3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BgMiFkT3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F2A4C4CECE; Sat, 9 Nov 2024 00:28:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731112111; bh=IBNh7dabfqa0UK+cVMrAB06ypmHTvI7x+e/C8pdK9Do=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BgMiFkT3kJMEDUFQwJv2OFXBZsChigON7OoHIvHLSPEsexdQU1gZ5c1OU1Ho5qApS LWGwPhjEcm4zvBMFIysFQOHMQCsw60Y7fh+GO+0sZuDlSk2y+MlNJBxFrIH2lW7j8F moZzKlkHFrKUeiLAE4nfQDI4/Cuhi2y8NiHC7u6xmFhD0npwO9tqHEYj0XT7aPXILL HoFKTJ4ZAEo+jL4bLxXCSaqIZ0a26E6+7oVT/xeuDoUNqij+tpZH2zxRmuxoDAj9eP ycxOsJUR9TDHVB7RBsgPS4fXkoZ3ju85c9B405TnJ4fMbiFItMuyNFd70tRUJc0i0n ubW3Pdi/6UvmA== From: Stephen Boyd To: Greg Kroah-Hartman Cc: Fei Shao , linux-kernel@vger.kernel.org, patches@lists.linux.dev, "Rob Herring (Arm)" , AngeloGioacchino Del Regno Subject: [PATCH 2/3] dt-bindings: spmi: spmi-mtk-pmif: Add compatible for MT8188 Date: Fri, 8 Nov 2024 16:28:27 -0800 Message-ID: <20241109002829.160973-3-sboyd@kernel.org> X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog In-Reply-To: <20241109002829.160973-1-sboyd@kernel.org> References: <20241109002829.160973-1-sboyd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fei Shao Add compatible string for the SPMI block on MT8188 SoC, which is compatible with the one used on MT8195. Acked-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Fei Shao Link: https://lore.kernel.org/r/20240911143429.850071-2-fshao@chromium.org Signed-off-by: Stephen Boyd --- Documentation/devicetree/bindings/spmi/mtk,spmi-mtk-pmif.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spmi/mtk,spmi-mtk-pmif.yaml = b/Documentation/devicetree/bindings/spmi/mtk,spmi-mtk-pmif.yaml index ac99883a3f29..7f0be0ac644a 100644 --- a/Documentation/devicetree/bindings/spmi/mtk,spmi-mtk-pmif.yaml +++ b/Documentation/devicetree/bindings/spmi/mtk,spmi-mtk-pmif.yaml @@ -25,6 +25,7 @@ properties: - items: - enum: - mediatek,mt8186-spmi + - mediatek,mt8188-spmi - const: mediatek,mt8195-spmi =20 reg: --=20 https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git From nobody Sat Nov 23 21:41:53 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B9E7517993; Sat, 9 Nov 2024 00:28:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731112112; cv=none; b=phQ+MZHzfF5NK/lCdPoxPaCic8PP0p1JHbDDix/99x/nVER/O4+apT2SISq2g0Tp+JwKZ0NdAWzwj0/yNrZNSPQw25t3yyaArqySfdlZ5AWeWbWHA9vqxWyJa2ZPAp6JXSBpS5HdqKZEgI4uEzmRyoOxQYfc2oBBd5LN8CXB+Wo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731112112; c=relaxed/simple; bh=XBnS+T3tfTWUgGdodsXOJJqALpDykojZytRpKocJqXE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HnmFKrJHzVq6O9+9tCMb9e0ctLP6X3wpQvYWlLDUKKwx18h3Kc60M/3D7HQciCXIb3IArHDIrHhLnaOpyM7tYYULk45JWhCKskQsz0hHfMBR9h99bDhlbSvqz0DdFre1EQjzAjNlgWu3rc4UNC0Nz0c/mGvqcGa8Bal+puYpUFo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LsVxsN6u; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LsVxsN6u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01B7FC4CED4; Sat, 9 Nov 2024 00:28:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731112112; bh=XBnS+T3tfTWUgGdodsXOJJqALpDykojZytRpKocJqXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LsVxsN6uw53xH+9j/c59fmMNGja5oZJYK6L0gd7kUv4D4Vt993+oouzVvtGTauW75 /bd5F662FfuBMg3t9ahj0/Lqfwr6CSlMyetPZqhgq39xUCRpHVldPSryiZDTZjckeo LJ8pyHTy7PUhSPRyrZUHQGicjGkW6ABgw8Oc3sr5n7rLDLSKjGnpTl6apYc939zqs7 nxUUUZu5KXOGuyilmZIeeL240UxgSV0mocNc3foV9Z6bfNIOc0h7OjQbGEpJ5TXwa2 dELaPbz/23AvA16kDzNYjgauuLxvmMukCpSGU+II7JpCdmFWlAhTpRDJh2Uj3P4X+K /ByOw7kh8hKGA== From: Stephen Boyd To: Greg Kroah-Hartman Cc: Dmitry Baryshkov , linux-kernel@vger.kernel.org, patches@lists.linux.dev, Krzysztof Kozlowski Subject: [PATCH 3/3] dt-bindings: spmi: qcom,x1e80100-spmi-pmic-arb: Add SAR2130P compatible Date: Fri, 8 Nov 2024 16:28:28 -0800 Message-ID: <20241109002829.160973-4-sboyd@kernel.org> X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog In-Reply-To: <20241109002829.160973-1-sboyd@kernel.org> References: <20241109002829.160973-1-sboyd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Dmitry Baryshkov SAR2130P has SPMI v7 arbiter. Although it has only a single bus configuration, use the new bindings for v7 platforms. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20241017-sar2130p-spmi-v1-1-43ac741ee071@li= naro.org Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd --- .../bindings/spmi/qcom,x1e80100-spmi-pmic-arb.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/spmi/qcom,x1e80100-spmi-pmic= -arb.yaml b/Documentation/devicetree/bindings/spmi/qcom,x1e80100-spmi-pmic-= arb.yaml index a28b70fb330a..7c3cc20a80d6 100644 --- a/Documentation/devicetree/bindings/spmi/qcom,x1e80100-spmi-pmic-arb.ya= ml +++ b/Documentation/devicetree/bindings/spmi/qcom,x1e80100-spmi-pmic-arb.ya= ml @@ -19,7 +19,11 @@ description: | =20 properties: compatible: - const: qcom,x1e80100-spmi-pmic-arb + oneOf: + - items: + - const: qcom,sar2130p-spmi-pmic-arb + - const: qcom,x1e80100-spmi-pmic-arb + - const: qcom,x1e80100-spmi-pmic-arb =20 reg: items: --=20 https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git