ARM: imx: vining2000: Properly discern PFUZE100 and PFUZE200
authorMarek Vasut <marex@denx.de>
Wed, 15 Jan 2020 10:27:31 +0000 (11:27 +0100)
committerStefano Babic <sbabic@denx.de>
Mon, 20 Jan 2020 14:37:23 +0000 (15:37 +0100)
The PFUZE100 and PFUZE200 PMICs can be discerned by bit 0 in DeviceID
register. Print the correct identification of the PMICs.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
board/softing/vining_2000/vining_2000.c

index 6dc3fc8b5043a6cbde8fc033ab506f68d83836bd..c74c06eaeecfb040df6c2095dae36476f3fa3678 100644 (file)
@@ -146,7 +146,7 @@ static struct pmic *pfuze_init(unsigned char i2cbus)
                return NULL;
 
        pmic_reg_read(p, PFUZE100_DEVICEID, &reg);
-       printf("PMIC:  PFUZE100 ID=0x%02x\n", reg);
+       printf("PMIC:  PFUZE%i00 ID=0x%02x\n", (reg & 1) ? 2 : 1, reg);
 
        /* Set SW1AB stanby volage to 0.975V */
        pmic_reg_read(p, PFUZE100_SW1ABSTBY, &reg);