pinctrl: add support for MediaTek MT7628
[oweals/u-boot.git] / include / palmas.h
index 229de537157c40c110ff2401cc3683682550cfdb..20c7e489c1ca945eb025953beb72af5411153adc 100644 (file)
 #define BB_VSEL_VBAT           (3 << 1)
 #define BB_CHRG_EN             (1 << 0)
 
+#ifndef CONFIG_DM_I2C
 /*
  * Functions to read and write from TPS659038/TWL6035/TWL6037
  * or other Palmas family of TI PMICs
@@ -130,6 +131,10 @@ static inline int palmas_i2c_read_u8(u8 chip_no, u8 reg, u8 *val)
 {
        return i2c_read(chip_no, reg, 1, val, 1);
 }
+#else
+int palmas_i2c_write_u8(u8 chip_no, u8 reg, u8 val);
+int palmas_i2c_read_u8(u8 chip_no, u8 reg, u8 *val);
+#endif
 
 void palmas_init_settings(void);
 int palmas_mmc1_poweron_ldo(uint ldo_volt, uint ldo_ctrl, uint voltage);