summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-01-09 19:57:55 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-01-09 19:58:35 +0000
commitb490f08b7c6f8b32b214e0fbf6dd3974066ec150 (patch)
tree2aa54c4d6b2a971f7fe0a648dc0f5fabacd177d2 /firmware
parenteee8243102460986ba1733222ebdbe9ac3200d77 (diff)
downloadrockbox-b490f08b7c6f8b32b214e0fbf6dd3974066ec150.tar.gz
rockbox-b490f08b7c6f8b32b214e0fbf6dd3974066ec150.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/axp-pmu.c13
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
129static struct axp_driver { 129static struct axp_driver {
130 int adc_enable; 130 int adc_enable;
131 int chip_id;
132} axp; 131} axp;
133 132
134static void axp_init_enabled_adcs(void) 133static 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
496enum { 490enum {
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: