summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-12-10 10:37:37 -0700
committerSimon Glass <sjg@chromium.org>2018-12-13 16:32:49 -0700
commita1b17e4f4c820c5ffe77ffa0c716e8b3b5d69866 (patch)
tree7487cc794f79e8bc32e1ee6c366d3b4e22466924 /arch/sandbox
parentd4901898654b664c41d8a03afc0e0fbf531b5812 (diff)
dm: core: Add a function to read into a unsigned int
The current dev_read...() functions use s32 and u32 which are convenient for device tree but not so useful for normal code, which often wants to use normal integers for values. Add a helper which supports returning an unsigned int. Also add signed versions of the unsigned readers. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/dts/test.dts2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 82bd91936a..3790b4c520 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -87,6 +87,8 @@
test2-gpios = <&gpio_a 1>, <&gpio_a 4>, <&gpio_b 6 1 3 2 1>,
<&gpio_b 7 2 3 2 1>, <&gpio_b 8 4 3 2 1>,
<&gpio_b 9 0xc 3 2 1>;
+ int-value = <1234>;
+ uint-value = <(-1234)>;
};
junk {