2 * Copyright (C) 2015 Lothar Waßmann <LW@KARO-electronics.de>
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
26 pmic_setup_func *init;
30 { 0x3c, ltc3676_pmic_setup, "LTC3676", },
33 { 0x32, rn5t618_pmic_setup, "RN5T618", },
36 { 0x33, rn5t567_pmic_setup, "RN5T567", },
40 int tx6_pmic_init(int i2c_addr, struct pmic_regs *regs, size_t num_regs)
44 const char *pmic = "N/A";
48 for (i = 0; i < ARRAY_SIZE(i2c_addrs); i++) {
50 if (i2c_addrs[i].addr == i2c_addr) {
51 pmic = i2c_addrs[i].name;
57 debug("Probing for I2C dev 0x%02x\n", i2c_addr);
58 ret = i2c_probe(i2c_addr);
60 debug("Initializing PMIC at I2C addr 0x%02x\n", i2c_addr);
61 ret = i2c_addrs[i].init(i2c_addr, regs, num_regs);
66 int tx6_pmic_init(int i2c_addr, struct pmic_regs *regs, size_t num_regs)
68 printf("PMIC: N/A\n");