power: Drop CONFIG_I2C_PMIC
authorSimon Glass <sjg@chromium.org>
Thu, 27 Apr 2017 04:27:47 +0000 (22:27 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 30 Apr 2017 14:29:53 +0000 (10:29 -0400)
This is only used by one board and should not be a CONFIG option. Instead
it should use the driver model pmic framework. For now, just move the
setting into the only board that uses it.

Signed-off-by: Simon Glass <sjg@chromium.org>
board/gateworks/gw_ventana/common.c
include/configs/gw_ventana.h
scripts/config_whitelist.txt

index 56a7b3e7fd482b6a65f865a0ad8120287ee79169..d27bd57648ca7bcd6d2a897067971be7332fcf59 100644 (file)
@@ -1272,14 +1272,15 @@ void setup_pmic(void)
        struct pmic *p;
        struct ventana_board_info ventana_info;
        int board = read_eeprom(CONFIG_I2C_GSC, &ventana_info);
+       const int i2c_pmic = 1;
        u32 reg;
 
-       i2c_set_bus_num(CONFIG_I2C_PMIC);
+       i2c_set_bus_num(i2c_pmic);
 
        /* configure PFUZE100 PMIC */
        if (!i2c_probe(CONFIG_POWER_PFUZE100_I2C_ADDR)) {
                debug("probed PFUZE100@0x%x\n", CONFIG_POWER_PFUZE100_I2C_ADDR);
-               power_pfuze100_init(CONFIG_I2C_PMIC);
+               power_pfuze100_init(i2c_pmic);
                p = pmic_get("PFUZE100");
                if (p && !pmic_probe(p)) {
                        pmic_reg_read(p, PFUZE100_DEVICEID, &reg);
@@ -1302,7 +1303,7 @@ void setup_pmic(void)
        /* configure LTC3676 PMIC */
        else if (!i2c_probe(CONFIG_POWER_LTC3676_I2C_ADDR)) {
                debug("probed LTC3676@0x%x\n", CONFIG_POWER_LTC3676_I2C_ADDR);
-               power_ltc3676_init(CONFIG_I2C_PMIC);
+               power_ltc3676_init(i2c_pmic);
                p = pmic_get("LTC3676_PMIC");
                if (!p || pmic_probe(p))
                        return;
index 2b98f535c6ba0ee78be4f6d2f58511d4841c396f..28289a348fea4141fe9fe739bf4743ee8307ad35 100644 (file)
@@ -95,7 +95,6 @@
 #define CONFIG_SYS_I2C_MXC_I2C3                /* enable I2C bus 3 */
 #define CONFIG_SYS_I2C_SPEED           100000
 #define CONFIG_I2C_GSC                 0
-#define CONFIG_I2C_PMIC                        1
 #define CONFIG_I2C_EDID
 
 /* MMC Configs */
index f639d2b0824d911b1705bacc061ff47442e348fd..b17b87bd7bcbeadcc79f9fa8e42d971eb6f46b11 100644 (file)
@@ -1399,7 +1399,6 @@ CONFIG_I2C_MVTWSI_BASE3
 CONFIG_I2C_MVTWSI_BASE4
 CONFIG_I2C_MVTWSI_BASE5
 CONFIG_I2C_MXC
-CONFIG_I2C_PMIC
 CONFIG_I2C_REPEATED_START
 CONFIG_I2C_RTC_ADDR
 CONFIG_I2C_TIMEOUT