projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.denx.de/u-boot-usb
[oweals/u-boot.git]
/
drivers
/
power
/
twl6030.c
diff --git
a/drivers/power/twl6030.c
b/drivers/power/twl6030.c
index bfeb34b428ac3fa144235bbdd6fbc852d0d43434..cd532008bdd001184a93eb83b22b0e343b59c227 100644
(file)
--- a/
drivers/power/twl6030.c
+++ b/
drivers/power/twl6030.c
@@
-28,6
+28,7
@@
static struct twl6030_data twl6032_info = {
.vbat_shift = TWL6032_VBAT_SHIFT,
};
.vbat_shift = TWL6032_VBAT_SHIFT,
};
+
static int twl6030_gpadc_read_channel(u8 channel_no)
{
u8 lsb = 0;
static int twl6030_gpadc_read_channel(u8 channel_no)
{
u8 lsb = 0;
@@
-71,6
+72,13
@@
static int twl6030_gpadc_sw2_trigger(void)
return 0;
}
return 0;
}
+void twl6030_power_off(void)
+{
+ twl6030_i2c_write_u8(TWL6030_CHIP_PM, TWL6030_PHOENIX_DEV_ON,
+ TWL6030_PHOENIX_APP_DEVOFF | TWL6030_PHOENIX_CON_DEVOFF |
+ TWL6030_PHOENIX_MOD_DEVOFF);
+}
+
void twl6030_stop_usb_charging(void)
{
twl6030_i2c_write_u8(TWL6030_CHIP_CHARGER, CONTROLLER_CTRL1, 0);
void twl6030_stop_usb_charging(void)
{
twl6030_i2c_write_u8(TWL6030_CHIP_CHARGER, CONTROLLER_CTRL1, 0);
@@
-223,9
+231,9
@@
void twl6030_power_mmc_init(int dev_index)
/* Enable P1 output for VMMC */
twl6030_i2c_write_u8(TWL6030_CHIP_PM, TWL6030_VMMC_CFG_STATE,
TWL6030_CFG_STATE_P1 | TWL6030_CFG_STATE_ON);
/* Enable P1 output for VMMC */
twl6030_i2c_write_u8(TWL6030_CHIP_PM, TWL6030_VMMC_CFG_STATE,
TWL6030_CFG_STATE_P1 | TWL6030_CFG_STATE_ON);
-
- twl6030_i2c_read_u8(TWL6030_CHIP_PM, TWL6030_PH_STS_BOOT, &value);
} else if (dev_index == 1) {
} else if (dev_index == 1) {
+ twl6030_i2c_read_u8(TWL6030_CHIP_PM, TWL6030_PH_STS_BOOT,
+ &value);
/* BOOT2 indicates 1.8V/2.8V VAUX1 for eMMC */
if (value & TWL6030_PH_STS_BOOT2) {
/* 1.8V voltage output for VAUX1 */
/* BOOT2 indicates 1.8V/2.8V VAUX1 for eMMC */
if (value & TWL6030_PH_STS_BOOT2) {
/* 1.8V voltage output for VAUX1 */