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>
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index a1f7c44..602c571 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -181,6 +181,7 @@
void lcdpower(int on)
{
u32 pin, swval, i;
+ char buf[16] = { 0 };
pin = env_get_ulong("ds1_pwr", 16, ~0UL);
@@ -191,6 +192,12 @@
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);