From eaba7df7041ebdd6cff3702d87d6bdb6870ec5e3 Mon Sep 17 00:00:00 2001 From: Hannes Schmelzer Date: Wed, 6 Feb 2019 13:25:59 +0100 Subject: board/BuR/brxre1: convert do DM This commit converts the brxre1 board to DM, for this we have todo following things: - add a devicetree-file for this board - drop all obsolete settings from board header-file - use dm_i2c_xxx calls for read/write to the resetcontroller - request gpios before operate them Serues-cc: trini@konsulko.com Signed-off-by: Hannes Schmelzer --- board/BuR/common/common.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'board/BuR/common/common.c') diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index a1f7c44abf..602c571f9c 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -181,6 +181,7 @@ void br_summaryscreen(void) void lcdpower(int on) { u32 pin, swval, i; + char buf[16] = { 0 }; pin = env_get_ulong("ds1_pwr", 16, ~0UL); @@ -191,6 +192,12 @@ void lcdpower(int on) for (i = 0; i < 3; i++) { if (pin != 0) { + snprintf(buf, sizeof(buf), "ds1_pwr#%d", i); + if (gpio_request(pin & 0x7F, buf) != 0) { + printf("%s: not able to request gpio %s", + __func__, buf); + continue; + } swval = pin & 0x80 ? 0 : 1; if (on) gpio_direction_output(pin & 0x7F, swval); -- cgit