projects
/
karo-tx-uboot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
da917c8
)
karo: tx6: pmic: print PMIC name in boot messages
author
Lothar Waßmann
<LW@KARO-electronics.de>
Tue, 26 Apr 2016 13:16:57 +0000
(15:16 +0200)
committer
Lothar Waßmann
<LW@KARO-electronics.de>
Tue, 26 Apr 2016 13:16:57 +0000
(15:16 +0200)
board/karo/tx6/pmic.c
patch
|
blob
|
history
diff --git
a/board/karo/tx6/pmic.c
b/board/karo/tx6/pmic.c
index
6e5b84c
..
3e4acda
100644
(file)
--- a/
board/karo/tx6/pmic.c
+++ b/
board/karo/tx6/pmic.c
@@
-23,15
+23,16
@@
static struct {
uchar addr;
pmic_setup_func *init;
static struct {
uchar addr;
pmic_setup_func *init;
+ const char *name;
} i2c_addrs[] = {
#ifdef CONFIG_LTC3676
} i2c_addrs[] = {
#ifdef CONFIG_LTC3676
- { 0x3c, ltc3676_pmic_setup, },
+ { 0x3c, ltc3676_pmic_setup,
"LTC3676",
},
#endif
#ifdef CONFIG_RN5T618
#endif
#ifdef CONFIG_RN5T618
- { 0x32, rn5t618_pmic_setup, },
+ { 0x32, rn5t618_pmic_setup,
"RN5T618",
},
#endif
#ifdef CONFIG_RN5T567
#endif
#ifdef CONFIG_RN5T567
- { 0x33, rn5t567_pmic_setup, },
+ { 0x33, rn5t567_pmic_setup,
"RN5T567",
},
#endif
};
#endif
};
@@
-40,6
+41,8
@@
int tx6_pmic_init(int addr, struct pmic_regs *regs, size_t num_regs)
int ret = -ENODEV;
int i;
int ret = -ENODEV;
int i;
+ printf("PMIC: ");
+
debug("Probing for I2C dev 0x%02x\n", addr);
for (i = 0; i < ARRAY_SIZE(i2c_addrs); i++) {
u8 i2c_addr = i2c_addrs[i].addr;
debug("Probing for I2C dev 0x%02x\n", addr);
for (i = 0; i < ARRAY_SIZE(i2c_addrs); i++) {
u8 i2c_addr = i2c_addrs[i].addr;
@@
-55,5
+58,6
@@
int tx6_pmic_init(int addr, struct pmic_regs *regs, size_t num_regs)
break;
}
}
break;
}
}
+ printf("%s\n", i == ARRAY_SIZE(i2c_addrs) ? "N/A" : i2c_addrs[i].name);
return ret;
}
return ret;
}