From b2b87a398de2bae03381c007be8b657c4d76806f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Tue, 26 Apr 2016 15:16:57 +0200 Subject: [PATCH 1/1] karo: tx6: pmic: print PMIC name in boot messages --- board/karo/tx6/pmic.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/board/karo/tx6/pmic.c b/board/karo/tx6/pmic.c index 6e5b84c6d8..3e4acda190 100644 --- a/board/karo/tx6/pmic.c +++ b/board/karo/tx6/pmic.c @@ -23,15 +23,16 @@ static struct { uchar addr; pmic_setup_func *init; + const char *name; } i2c_addrs[] = { #ifdef CONFIG_LTC3676 - { 0x3c, ltc3676_pmic_setup, }, + { 0x3c, ltc3676_pmic_setup, "LTC3676", }, #endif #ifdef CONFIG_RN5T618 - { 0x32, rn5t618_pmic_setup, }, + { 0x32, rn5t618_pmic_setup, "RN5T618", }, #endif #ifdef CONFIG_RN5T567 - { 0x33, rn5t567_pmic_setup, }, + { 0x33, rn5t567_pmic_setup, "RN5T567", }, #endif }; @@ -40,6 +41,8 @@ int tx6_pmic_init(int addr, struct pmic_regs *regs, size_t num_regs) 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; @@ -55,5 +58,6 @@ int tx6_pmic_init(int addr, struct pmic_regs *regs, size_t num_regs) break; } } + printf("%s\n", i == ARRAY_SIZE(i2c_addrs) ? "N/A" : i2c_addrs[i].name); return ret; } -- 2.39.2