* [PATCH 0/3] SPMI patches for the next merge window
@ 2024-11-09 0:28 Stephen Boyd
2024-11-09 0:28 ` [PATCH 1/3] spmi: pmic-arb: fix return path in for_each_available_child_of_node() Stephen Boyd
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stephen Boyd @ 2024-11-09 0:28 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, patches
Hi Greg,
Please apply these SPMI patches for the next merge window.
- Compatible string updates for SPMI bindings
- Use scoped version of for_each_available_child_of_node() to avoid
leaks
Dmitry Baryshkov (1):
dt-bindings: spmi: qcom,x1e80100-spmi-pmic-arb: Add SAR2130P
compatible
Fei Shao (1):
dt-bindings: spmi: spmi-mtk-pmif: Add compatible for MT8188
Javier Carrasco (1):
spmi: pmic-arb: fix return path in for_each_available_child_of_node()
.../devicetree/bindings/spmi/mtk,spmi-mtk-pmif.yaml | 1 +
.../bindings/spmi/qcom,x1e80100-spmi-pmic-arb.yaml | 6 +++++-
drivers/spmi/spmi-pmic-arb.c | 3 +--
3 files changed, 7 insertions(+), 3 deletions(-)
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] spmi: pmic-arb: fix return path in for_each_available_child_of_node()
2024-11-09 0:28 [PATCH 0/3] SPMI patches for the next merge window Stephen Boyd
@ 2024-11-09 0:28 ` Stephen Boyd
2024-11-09 0:28 ` [PATCH 2/3] dt-bindings: spmi: spmi-mtk-pmif: Add compatible for MT8188 Stephen Boyd
2024-11-09 0:28 ` [PATCH 3/3] dt-bindings: spmi: qcom,x1e80100-spmi-pmic-arb: Add SAR2130P compatible Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2024-11-09 0:28 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Javier Carrasco, linux-kernel, patches, stable, Neil Armstrong
From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
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 <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20241001-spmi-pmic-arb-scoped-v1-1-5872bab34ed6@gmail.com
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
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 = &pdev->dev;
struct device_node *node = dev->of_node;
- struct device_node *child;
int ret;
/* 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);
- 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 = spmi_pmic_arb_bus_init(pdev, child, pmic_arb);
if (ret)
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] dt-bindings: spmi: spmi-mtk-pmif: Add compatible for MT8188
2024-11-09 0:28 [PATCH 0/3] SPMI patches for the next merge window Stephen Boyd
2024-11-09 0:28 ` [PATCH 1/3] spmi: pmic-arb: fix return path in for_each_available_child_of_node() Stephen Boyd
@ 2024-11-09 0:28 ` Stephen Boyd
2024-11-09 0:28 ` [PATCH 3/3] dt-bindings: spmi: qcom,x1e80100-spmi-pmic-arb: Add SAR2130P compatible Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2024-11-09 0:28 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Fei Shao, linux-kernel, patches, Rob Herring (Arm),
AngeloGioacchino Del Regno
From: Fei Shao <fshao@chromium.org>
Add compatible string for the SPMI block on MT8188 SoC, which is
compatible with the one used on MT8195.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Fei Shao <fshao@chromium.org>
Link: https://lore.kernel.org/r/20240911143429.850071-2-fshao@chromium.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
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
reg:
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] dt-bindings: spmi: qcom,x1e80100-spmi-pmic-arb: Add SAR2130P compatible
2024-11-09 0:28 [PATCH 0/3] SPMI patches for the next merge window Stephen Boyd
2024-11-09 0:28 ` [PATCH 1/3] spmi: pmic-arb: fix return path in for_each_available_child_of_node() Stephen Boyd
2024-11-09 0:28 ` [PATCH 2/3] dt-bindings: spmi: spmi-mtk-pmif: Add compatible for MT8188 Stephen Boyd
@ 2024-11-09 0:28 ` Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2024-11-09 0:28 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Dmitry Baryshkov, linux-kernel, patches, Krzysztof Kozlowski
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
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 <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241017-sar2130p-spmi-v1-1-43ac741ee071@linaro.org
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
.../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.yaml
+++ b/Documentation/devicetree/bindings/spmi/qcom,x1e80100-spmi-pmic-arb.yaml
@@ -19,7 +19,11 @@ description: |
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
reg:
items:
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-09 0:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-09 0:28 [PATCH 0/3] SPMI patches for the next merge window Stephen Boyd
2024-11-09 0:28 ` [PATCH 1/3] spmi: pmic-arb: fix return path in for_each_available_child_of_node() Stephen Boyd
2024-11-09 0:28 ` [PATCH 2/3] dt-bindings: spmi: spmi-mtk-pmif: Add compatible for MT8188 Stephen Boyd
2024-11-09 0:28 ` [PATCH 3/3] dt-bindings: spmi: qcom,x1e80100-spmi-pmic-arb: Add SAR2130P compatible Stephen Boyd
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.