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>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user