From: Patrick Delaunay Date: Thu, 7 Mar 2019 09:57:12 +0100 Subject: [U-Boot] [PATCH 0/2] syscon: update syscon_regmap_lookup_by_phandle Message-ID: <1551949034-26818-1-git-send-email-patrick.delaunay@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Change the function syscon_regmap_lookup_by_phandle() introduced by commit 6c3af1f24e4b ("syscon: dm: Add a new method to get a regmap from DTS") to have Linux-compatible syscon API and add test for this case: phandle to node with generic "syscon" compatible not bound as syscon UCLASS by default. Without the patch the added test failed. And I also update sysreset-syscon driver to use this function and simplify the code, tested on my stm32mp1 board with: rcc_reboot: rcc-reboot at 50000000 { compatible = "syscon-reboot"; regmap = <&rcc>; offset = <0x404>; mask = <0x1>; }; rcc: rcc at 50000000 { compatible = "st,stm32mp1-rcc", "syscon"; reg = <0x50000000 0x1000>; #clock-cells = <1>; #reset-cells = <1>; }; PS: compatible st,stm32mp1-rcc is bound to driver drivers/misc/stm32_rcc.c Patrick Delaunay (2): syscon: update syscon_regmap_lookup_by_phandle sysreset: use syscon_regmap_lookup_by_phandle arch/sandbox/dts/test.dts | 3 +- drivers/core/syscon-uclass.c | 83 +++++++++++++++++++++++++++----------- drivers/sysreset/sysreset_syscon.c | 15 +------ test/dm/syscon.c | 7 ++++ 4 files changed, 70 insertions(+), 38 deletions(-) -- 2.7.4