summaryrefslogtreecommitdiff
path: root/board/BuR/common/common.c
diff options
context:
space:
mode:
authorHannes Schmelzer <hannes.schmelzer@br-automation.com>2019-02-06 15:25:59 +0300
committerTom Rini <trini@konsulko.com>2019-02-19 16:55:43 +0300
commiteaba7df7041ebdd6cff3702d87d6bdb6870ec5e3 (patch)
tree08ef9a4a8abeaae0854e12f64109d2dffe093876 /board/BuR/common/common.c
parent90037d4c73ed704d85485d4fa68a618d4db2b12a (diff)
downloadu-boot-eaba7df7041ebdd6cff3702d87d6bdb6870ec5e3.tar.xz
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 <hannes.schmelzer@br-automation.com>
Diffstat (limited to 'board/BuR/common/common.c')
-rw-r--r--board/BuR/common/common.c7
1 files changed, 7 insertions, 0 deletions
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);