X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fpalmas.h;h=20c7e489c1ca945eb025953beb72af5411153adc;hb=915f15ac5746739da0aa2ee2840c2d00dc65aaaa;hp=d366c98d22e2e48f5ab857b54051f4945192ef6b;hpb=cd43b51600918a03216146c1bb4a73f4d7f04901;p=oweals%2Fu-boot.git diff --git a/include/palmas.h b/include/palmas.h index d366c98d22..20c7e489c1 100644 --- a/include/palmas.h +++ b/include/palmas.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2012-2013 * Texas Instruments, - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef PALMAS_H #define PALMAS_H @@ -118,6 +117,7 @@ #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 @@ -131,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);