d1: add new target
[openwrt/openwrt.git] / target / linux / d1 / patches-6.1 / 0023-soc-sunxi-sram-Only-iterate-over-SRAM-children.patch
1 From 1946ff7ee38c994ae3eb9968c5b51695c0df2cf7 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Tue, 2 Aug 2022 00:01:21 -0500
4 Subject: [PATCH 023/117] soc: sunxi: sram: Only iterate over SRAM children
5
6 Now that a "regulators" child is accepted by the controller binding, the
7 debugfs show routine must be explicitly limited to "sram" children.
8
9 Series-to: Liam Girdwood <lgirdwood@gmail.com>
10 Series-to: Mark Brown <broonie@kernel.org>
11 Series-to: Chen-Yu Tsai <wens@csie.org>
12 Series-to: Jernej Skrabec <jernej.skrabec@gmail.com>
13 Series-to: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
14 Series-to: Rob Herring <robh+dt@kernel.org>
15
16 Commit-changes: 2
17 - New patch for v2
18
19 Series-version: 4
20
21 Cover-letter:
22 regulator: Add support for Allwinner D1 LDOs
23 This series adds bindings and a driver for the two pairs of LDOs
24 inside the Allwinner D1 SoC.
25
26 A binding and driver change is required for the SRAM controller, to
27 accept the regulators device as its child node. The new example in the
28 SRAM controller binding uses the compatible string added in this series:
29 https://lore.kernel.org/lkml/20220815041248.53268-1-samuel@sholland.org/
30 END
31
32 Reviewed-by: Heiko Stuebner <heiko@sntech.de>
33 Tested-by: Heiko Stuebner <heiko@sntech.de>
34 Signed-off-by: Samuel Holland <samuel@sholland.org>
35 ---
36 drivers/soc/sunxi/sunxi_sram.c | 3 +++
37 1 file changed, 3 insertions(+)
38
39 --- a/drivers/soc/sunxi/sunxi_sram.c
40 +++ b/drivers/soc/sunxi/sunxi_sram.c
41 @@ -120,6 +120,9 @@ static int sunxi_sram_show(struct seq_fi
42 seq_puts(s, "--------------------\n\n");
43
44 for_each_child_of_node(sram_dev->of_node, sram_node) {
45 + if (!of_node_name_eq(sram_node, "sram"))
46 + continue;
47 +
48 sram_addr_p = of_get_address(sram_node, 0, NULL, NULL);
49
50 seq_printf(s, "sram@%08x\n",