diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/axp-pmu.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/firmware/drivers/axp-pmu.c b/firmware/drivers/axp-pmu.c index e9af3c0b05..ed284ee9c2 100644 --- a/firmware/drivers/axp-pmu.c +++ b/firmware/drivers/axp-pmu.c | |||
@@ -128,18 +128,12 @@ static const struct axp_supply_info axp_supply_info[AXP_NUM_SUPPLIES] = { | |||
128 | 128 | ||
129 | static struct axp_driver { | 129 | static struct axp_driver { |
130 | int adc_enable; | 130 | int adc_enable; |
131 | int chip_id; | ||
132 | } axp; | 131 | } axp; |
133 | 132 | ||
134 | static void axp_init_enabled_adcs(void) | 133 | static void axp_init_enabled_adcs(void) |
135 | { | 134 | { |
136 | axp.adc_enable = 0; | 135 | axp.adc_enable = 0; |
137 | 136 | ||
138 | /* Read chip ID, so we can display it on the debug screen. | ||
139 | * This is undocumented but there's Linux driver code floating around | ||
140 | * which suggests this should work for many AXP chips. */ | ||
141 | axp.chip_id = i2c_reg_read1(AXP_PMU_BUS, AXP_PMU_ADDR, AXP_REG_CHIP_ID); | ||
142 | |||
143 | /* Read enabled ADCs from the hardware */ | 137 | /* Read enabled ADCs from the hardware */ |
144 | uint8_t regs[2]; | 138 | uint8_t regs[2]; |
145 | int rc = i2c_reg_read(AXP_PMU_BUS, AXP_PMU_ADDR, | 139 | int rc = i2c_reg_read(AXP_PMU_BUS, AXP_PMU_ADDR, |
@@ -494,7 +488,6 @@ void axp_power_off(void) | |||
494 | 488 | ||
495 | #ifndef BOOTLOADER | 489 | #ifndef BOOTLOADER |
496 | enum { | 490 | enum { |
497 | AXP_DEBUG_CHIP_ID, | ||
498 | AXP_DEBUG_BATTERY_STATUS, | 491 | AXP_DEBUG_BATTERY_STATUS, |
499 | AXP_DEBUG_INPUT_STATUS, | 492 | AXP_DEBUG_INPUT_STATUS, |
500 | AXP_DEBUG_CHARGE_CURRENT, | 493 | AXP_DEBUG_CHARGE_CURRENT, |
@@ -568,12 +561,6 @@ static const char* axp_debug_menu_get_name(int item, void* data, | |||
568 | } | 561 | } |
569 | 562 | ||
570 | switch(item) { | 563 | switch(item) { |
571 | case AXP_DEBUG_CHIP_ID: { | ||
572 | snprintf(buf, buflen, "Chip ID: %d (%02x) [Driver: AXP%d]", | ||
573 | axp.chip_id, axp.chip_id, HAVE_AXP_PMU); | ||
574 | return buf; | ||
575 | } break; | ||
576 | |||
577 | case AXP_DEBUG_BATTERY_STATUS: { | 564 | case AXP_DEBUG_BATTERY_STATUS: { |
578 | switch(axp_battery_status()) { | 565 | switch(axp_battery_status()) { |
579 | case AXP_BATT_FULL: | 566 | case AXP_BATT_FULL: |