diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-01-09 16:03:30 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-01-09 19:58:34 +0000 |
commit | eaee5e7339aec46b4b67f06b139b8708810a4c2e (patch) | |
tree | 28bac18b6a68caae4689c712b4b7d2ab80fed583 /firmware/target/mips/ingenic_x1000/erosqnative/button-erosqnative.c | |
parent | 8f063d49c2e1dffb5548e40b69782963e18b1171 (diff) | |
download | rockbox-eaee5e7339aec46b4b67f06b139b8708810a4c2e.tar.gz rockbox-eaee5e7339aec46b4b67f06b139b8708810a4c2e.zip |
Revert "AXP PMU rewrite (again)"
This caused LCD problems on the ErosQ, where the screen would
go white until being put through a sleep/wake cycle. The exact
reason for this isn't obvious, but the problem didn't exist
prior to the AXP driver rewrite.
The two dependent changes,
42999913ba - x1000: Increase USB current limit to 500 mA at all times
90dd2f84a9 - x1000: Correctly limit USB charging current
ended up bringing the USB charging situation back to where it
was prior to the rewrite, so the cleanest option is to revert
the whole lot.
This reverts commit 42999913ba3a76221fceb04b1f935ed4e0e71476.
This reverts commit 90dd2f84a9174c38dbfb07d582ec6ee7697b1939.
This reverts commit 2d891439623bb76d38b98202ca5f3eea3c01c5f0.
Change-Id: I1cff2bfdd1b189df14bcf8cce42db725caa470d7
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/erosqnative/button-erosqnative.c')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/erosqnative/button-erosqnative.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/mips/ingenic_x1000/erosqnative/button-erosqnative.c b/firmware/target/mips/ingenic_x1000/erosqnative/button-erosqnative.c index 64041795a3..1583db175a 100644 --- a/firmware/target/mips/ingenic_x1000/erosqnative/button-erosqnative.c +++ b/firmware/target/mips/ingenic_x1000/erosqnative/button-erosqnative.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "backlight.h" | 24 | #include "backlight.h" |
25 | #include "powermgmt.h" | 25 | #include "powermgmt.h" |
26 | #include "panic.h" | 26 | #include "panic.h" |
27 | #include "axp192.h" | 27 | #include "axp-pmu.h" |
28 | #include "gpio-x1000.h" | 28 | #include "gpio-x1000.h" |
29 | #include "irq-x1000.h" | 29 | #include "irq-x1000.h" |
30 | #include "i2c-x1000.h" | 30 | #include "i2c-x1000.h" |
@@ -89,7 +89,7 @@ static int hp_detect_tmo_cb(struct timeout* tmo) | |||
89 | static void hp_detect_init(void) | 89 | static void hp_detect_init(void) |
90 | { | 90 | { |
91 | static struct timeout tmo; | 91 | static struct timeout tmo; |
92 | static const uint8_t gpio_reg = AXP_REG_GPIOLEVEL1; | 92 | static const uint8_t gpio_reg = AXP192_REG_GPIOSTATE1; |
93 | static i2c_descriptor desc = { | 93 | static i2c_descriptor desc = { |
94 | .slave_addr = AXP_PMU_ADDR, | 94 | .slave_addr = AXP_PMU_ADDR, |
95 | .bus_cond = I2C_START | I2C_STOP, | 95 | .bus_cond = I2C_START | I2C_STOP, |
@@ -105,11 +105,11 @@ static void hp_detect_init(void) | |||
105 | 105 | ||
106 | /* Headphone and LO detects are wired to AXP192 GPIOs 0 and 1, | 106 | /* Headphone and LO detects are wired to AXP192 GPIOs 0 and 1, |
107 | * set them to inputs. */ | 107 | * set them to inputs. */ |
108 | axp_set_gpio_function(0, AXP_GPIO_INPUT); /* HP detect */ | 108 | i2c_reg_write1(AXP_PMU_BUS, AXP_PMU_ADDR, AXP192_REG_GPIO0FUNCTION, 0x01); /* HP detect */ |
109 | axp_set_gpio_function(1, AXP_GPIO_INPUT); /* LO detect */ | 109 | i2c_reg_write1(AXP_PMU_BUS, AXP_PMU_ADDR, AXP192_REG_GPIO1FUNCTION, 0x01); /* LO detect */ |
110 | 110 | ||
111 | /* Get an initial reading before startup */ | 111 | /* Get an initial reading before startup */ |
112 | int r = axp_read(gpio_reg); | 112 | int r = i2c_reg_read1(AXP_PMU_BUS, AXP_PMU_ADDR, gpio_reg); |
113 | if(r >= 0) | 113 | if(r >= 0) |
114 | { | 114 | { |
115 | hp_detect_reg = r; | 115 | hp_detect_reg = r; |