![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Macros | |
#define | TPS65090_I2C_ADDR 0x48 |
Enumerations | |
enum | fet_id { FET1_CTRL = 0x0f , FET2_CTRL , FET3_CTRL , FET4_CTRL , FET5_CTRL , FET6_CTRL , FET7_CTRL } |
enum | { TPS65090_ST1_OTC = 1 << 0 , TPS65090_ST1_OCC = 1 << 1 , TPS65090_ST1_STATE_SHIFT = 4 , TPS65090_ST1_STATE_MASK = 0xf << TPS65090_ST1_STATE_SHIFT } |
enum | { FET_ERR_COMMS = -1 , FET_ERR_NOT_READY = -2 } |
Functions | |
int | tps65090_fet_enable (unsigned int bus, enum fet_id fet_id) |
Enable FET. More... | |
int | tps65090_fet_disable (unsigned int bus, enum fet_id fet_id) |
Disable FET. More... | |
int | tps65090_fet_is_enabled (unsigned int bus, enum fet_id fet_id) |
Is FET enabled? More... | |
int | tps65090_set_charge_enable (unsigned int bus, int enable) |
Enable / disable the battery charger. More... | |
int | tps65090_is_charging (unsigned int bus) |
Check whether we have enabled battery charging. More... | |
int | tps65090_get_status (unsigned int bus) |
Return the value of the status register. More... | |
#define TPS65090_I2C_ADDR 0x48 |
Definition at line 7 of file tps65090.h.
anonymous enum |
Enumerator | |
---|---|
TPS65090_ST1_OTC | |
TPS65090_ST1_OCC | |
TPS65090_ST1_STATE_SHIFT | |
TPS65090_ST1_STATE_MASK |
Definition at line 20 of file tps65090.h.
anonymous enum |
Enumerator | |
---|---|
FET_ERR_COMMS | |
FET_ERR_NOT_READY |
Definition at line 29 of file tps65090.h.
enum fet_id |
Enumerator | |
---|---|
FET1_CTRL | |
FET2_CTRL | |
FET3_CTRL | |
FET4_CTRL | |
FET5_CTRL | |
FET6_CTRL | |
FET7_CTRL |
Definition at line 10 of file tps65090.h.
Disable FET.
bus | I2C bus number the TPS65090 is on |
fet_id | FET ID, value between 1 and 7 |
Definition at line 129 of file tps65090.c.
References tps65090_fet_set().
Enable FET.
bus | I2C bus number the TPS65090 is on |
fet_id | FET ID, value between 1 and 7 return 0 on success, non-0 on failure |
Definition at line 95 of file tps65090.c.
References BIOS_DEBUG, FET_ERR_NOT_READY, printk, tps65090_fet_set(), and udelay().
Referenced by backlight_vdd(), lcd_vdd(), and sdmmc_vdd().
Is FET enabled?
bus | I2C bus number the TPS65090 is on |
fet_id | FET ID, value between 1 and 7 |
Definition at line 134 of file tps65090.c.
References BIOS_DEBUG, FET_CTRL_ENFET, printk, and tps65090_i2c_read().
int tps65090_get_status | ( | unsigned int | bus | ) |
Return the value of the status register.
bus | I2C bus number the TPS65090 is on |
Definition at line 179 of file tps65090.c.
References REG_CG_STATUS1, tps65090_i2c_read(), and val.
int tps65090_is_charging | ( | unsigned int | bus | ) |
Check whether we have enabled battery charging.
bus | I2C bus number the TPS65090 is on |
Definition at line 148 of file tps65090.c.
References CG_CTRL0_ENC_MASK, REG_CG_CTRL0, tps65090_i2c_read(), and val.
int tps65090_set_charge_enable | ( | unsigned int | bus, |
int | enable | ||
) |
Enable / disable the battery charger.
bus | I2C bus number the TPS65090 is on |
enable | 0 to disable charging, non-zero to enable |
Definition at line 159 of file tps65090.c.
References BIOS_DEBUG, CG_CTRL0_ENC_MASK, printk, REG_CG_CTRL0, tps65090_i2c_read(), tps65090_i2c_write(), and val.