diff options
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c b/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c index 0ef7bd2f64..24daf2ef69 100644 --- a/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c +++ b/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.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 "ft6x06.h" | 28 | #include "ft6x06.h" |
29 | #include "gpio-x1000.h" | 29 | #include "gpio-x1000.h" |
30 | #include "irq-x1000.h" | 30 | #include "irq-x1000.h" |
@@ -393,7 +393,7 @@ static int hp_detect_tmo_cb(struct timeout* tmo) | |||
393 | static void hp_detect_init(void) | 393 | static void hp_detect_init(void) |
394 | { | 394 | { |
395 | static struct timeout tmo; | 395 | static struct timeout tmo; |
396 | static const uint8_t gpio_reg = AXP_REG_GPIOLEVEL1; | 396 | static const uint8_t gpio_reg = AXP192_REG_GPIOSTATE1; |
397 | static i2c_descriptor desc = { | 397 | static i2c_descriptor desc = { |
398 | .slave_addr = AXP_PMU_ADDR, | 398 | .slave_addr = AXP_PMU_ADDR, |
399 | .bus_cond = I2C_START | I2C_STOP, | 399 | .bus_cond = I2C_START | I2C_STOP, |
@@ -408,10 +408,10 @@ static void hp_detect_init(void) | |||
408 | }; | 408 | }; |
409 | 409 | ||
410 | /* Headphone detect is wired to AXP192 GPIO: set it to input state */ | 410 | /* Headphone detect is wired to AXP192 GPIO: set it to input state */ |
411 | axp_set_gpio_function(2, AXP_GPIO_INPUT); | 411 | i2c_reg_write1(AXP_PMU_BUS, AXP_PMU_ADDR, AXP192_REG_GPIO2FUNCTION, 0x01); |
412 | 412 | ||
413 | /* Get an initial reading before startup */ | 413 | /* Get an initial reading before startup */ |
414 | int r = axp_read(gpio_reg); | 414 | int r = i2c_reg_read1(AXP_PMU_BUS, AXP_PMU_ADDR, gpio_reg); |
415 | if(r >= 0) | 415 | if(r >= 0) |
416 | hp_detect_reg = r; | 416 | hp_detect_reg = r; |
417 | 417 | ||