From 0ced26a494ec089156dc4fd0a57c6ea45942c0dd Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Thu, 24 Sep 2020 10:04:18 +0530 Subject: test: dm: Add tests for regmap managed API and regmap fields The tests rely on a dummy driver to allocate and initialize the regmaps and the regmap fields using the managed API. The first test checks if the regmap config fields like width, reg_offset_shift, range specifiers, etc work. The second test checks if regmap fields behave properly (mask and shift are ok) by peeking into the regmap. Signed-off-by: Jean-Jacques Hiblot Signed-off-by: Pratyush Yadav Reviewed-by: Simon Glass --- arch/sandbox/dts/test.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/sandbox') diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index ceed2be65c9..2523e597237 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -1139,6 +1139,19 @@ resets = <&resetc2 15>, <&resetc2 30>, <&resetc2 60>; reset-names = "valid", "no_mask", "out_of_range"; }; + + some_regmapped-bus { + #address-cells = <0x1>; + #size-cells = <0x1>; + + ranges = <0x0 0x0 0x10>; + compatible = "simple-bus"; + + regmap-test_0 { + reg = <0 0x10>; + compatible = "sandbox,regmap_test"; + }; + }; }; #include "sandbox_pmic.dtsi" -- cgit v1.2.3