diff options
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/shanlingq1/button-shanlingq1.c')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/shanlingq1/button-shanlingq1.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/mips/ingenic_x1000/shanlingq1/button-shanlingq1.c b/firmware/target/mips/ingenic_x1000/shanlingq1/button-shanlingq1.c index 1976dde793..13b0cdd078 100644 --- a/firmware/target/mips/ingenic_x1000/shanlingq1/button-shanlingq1.c +++ b/firmware/target/mips/ingenic_x1000/shanlingq1/button-shanlingq1.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include "button.h" | 23 | #include "button.h" |
24 | #include "touchscreen.h" | 24 | #include "touchscreen.h" |
25 | #include "ft6x06.h" | 25 | #include "ft6x06.h" |
26 | #include "axp192.h" | 26 | #include "axp-pmu.h" |
27 | #include "kernel.h" | 27 | #include "kernel.h" |
28 | #include "backlight.h" | 28 | #include "backlight.h" |
29 | #include "powermgmt.h" | 29 | #include "powermgmt.h" |
@@ -57,7 +57,7 @@ static void hp_detect_init(void) | |||
57 | { | 57 | { |
58 | /* TODO: replace this copy paste cruft with an API in axp-pmu */ | 58 | /* TODO: replace this copy paste cruft with an API in axp-pmu */ |
59 | static struct timeout tmo; | 59 | static struct timeout tmo; |
60 | static const uint8_t gpio_reg = AXP_REG_GPIOLEVEL1; | 60 | static const uint8_t gpio_reg = AXP192_REG_GPIOSTATE1; |
61 | static i2c_descriptor desc = { | 61 | static i2c_descriptor desc = { |
62 | .slave_addr = AXP_PMU_ADDR, | 62 | .slave_addr = AXP_PMU_ADDR, |
63 | .bus_cond = I2C_START | I2C_STOP, | 63 | .bus_cond = I2C_START | I2C_STOP, |
@@ -72,10 +72,10 @@ static void hp_detect_init(void) | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | /* Headphone detect is wired to AXP192 GPIO: set it to input state */ | 74 | /* Headphone detect is wired to AXP192 GPIO: set it to input state */ |
75 | axp_set_gpio_function(1, AXP_GPIO_INPUT); | 75 | i2c_reg_write1(AXP_PMU_BUS, AXP_PMU_ADDR, AXP192_REG_GPIO1FUNCTION, 0x01); |
76 | 76 | ||
77 | /* Get an initial reading before startup */ | 77 | /* Get an initial reading before startup */ |
78 | int r = axp_read(gpio_reg); | 78 | int r = i2c_reg_read1(AXP_PMU_BUS, AXP_PMU_ADDR, gpio_reg); |
79 | if(r >= 0) | 79 | if(r >= 0) |
80 | hp_detect_reg = r; | 80 | hp_detect_reg = r; |
81 | 81 | ||