From mboxrd@z Thu Jan 1 00:00:00 1970 From: sjg at google.com Date: Fri, 14 Dec 2018 07:35:59 -0800 Subject: [U-Boot] [PATCH v2 08/22] dm: core: Add a function to read into a unsigned int In-Reply-To: <20181210173751.177266-9-sjg@chromium.org> References: <20181210173751.177266-9-sjg@chromium.org> <20181210173751.177266-1-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v2: None arch/sandbox/dts/test.dts | 2 ++ drivers/core/read.c | 23 ++++++++++++++++ include/dm/read.h | 58 +++++++++++++++++++++++++++++++++++++++ test/dm/test-fdt.c | 35 +++++++++++++++++++++++ 4 files changed, 118 insertions(+) Applied to u-boot-dm/master