From b490f08b7c6f8b32b214e0fbf6dd3974066ec150 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 9 Jan 2022 19:57:55 +0000 Subject: axp-pmu: remove chip ID code It's useless except to developers, who can easily add code somewhere to print the ID. Change-Id: I486240f1c7b45808a1a830abdb22b9381d69cb3f --- firmware/drivers/axp-pmu.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'firmware') 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] = { static struct axp_driver { int adc_enable; - int chip_id; } axp; static void axp_init_enabled_adcs(void) { axp.adc_enable = 0; - /* Read chip ID, so we can display it on the debug screen. - * This is undocumented but there's Linux driver code floating around - * which suggests this should work for many AXP chips. */ - axp.chip_id = i2c_reg_read1(AXP_PMU_BUS, AXP_PMU_ADDR, AXP_REG_CHIP_ID); - /* Read enabled ADCs from the hardware */ uint8_t regs[2]; int rc = i2c_reg_read(AXP_PMU_BUS, AXP_PMU_ADDR, @@ -494,7 +488,6 @@ void axp_power_off(void) #ifndef BOOTLOADER enum { - AXP_DEBUG_CHIP_ID, AXP_DEBUG_BATTERY_STATUS, AXP_DEBUG_INPUT_STATUS, AXP_DEBUG_CHARGE_CURRENT, @@ -568,12 +561,6 @@ static const char* axp_debug_menu_get_name(int item, void* data, } switch(item) { - case AXP_DEBUG_CHIP_ID: { - snprintf(buf, buflen, "Chip ID: %d (%02x) [Driver: AXP%d]", - axp.chip_id, axp.chip_id, HAVE_AXP_PMU); - return buf; - } break; - case AXP_DEBUG_BATTERY_STATUS: { switch(axp_battery_status()) { case AXP_BATT_FULL: -- cgit v1.2.3