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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c b/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c index 85ccc5cf65..efc652c84f 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 "axp173.h" | 27 | #include "axp-pmu.h" |
28 | #include "gpio-x1000.h" | 28 | #include "gpio-x1000.h" |
29 | #include "i2c-x1000.h" | 29 | #include "i2c-x1000.h" |
30 | #include <string.h> | 30 | #include <string.h> |
@@ -418,7 +418,7 @@ static uint8_t hp_detect_reg = 0x00; | |||
418 | static int hp_detect_tmo_cb(struct timeout* tmo) | 418 | static int hp_detect_tmo_cb(struct timeout* tmo) |
419 | { | 419 | { |
420 | i2c_descriptor* d = (i2c_descriptor*)tmo->data; | 420 | i2c_descriptor* d = (i2c_descriptor*)tmo->data; |
421 | i2c_async_queue(AXP173_BUS, TIMEOUT_NOBLOCK, I2C_Q_ADD, 0, d); | 421 | i2c_async_queue(AXP_PMU_BUS, TIMEOUT_NOBLOCK, I2C_Q_ADD, 0, d); |
422 | return HPD_POLL_TIME; | 422 | return HPD_POLL_TIME; |
423 | } | 423 | } |
424 | 424 | ||
@@ -427,7 +427,7 @@ static void hp_detect_init(void) | |||
427 | static struct timeout tmo; | 427 | static struct timeout tmo; |
428 | static const uint8_t gpio_reg = AXP192_REG_GPIOSTATE1; | 428 | static const uint8_t gpio_reg = AXP192_REG_GPIOSTATE1; |
429 | static i2c_descriptor desc = { | 429 | static i2c_descriptor desc = { |
430 | .slave_addr = AXP173_ADDR, | 430 | .slave_addr = AXP_PMU_ADDR, |
431 | .bus_cond = I2C_START | I2C_STOP, | 431 | .bus_cond = I2C_START | I2C_STOP, |
432 | .tran_mode = I2C_READ, | 432 | .tran_mode = I2C_READ, |
433 | .buffer[0] = (void*)&gpio_reg, | 433 | .buffer[0] = (void*)&gpio_reg, |
@@ -440,10 +440,10 @@ static void hp_detect_init(void) | |||
440 | }; | 440 | }; |
441 | 441 | ||
442 | /* Headphone detect is wired to AXP192 GPIO: set it to input state */ | 442 | /* Headphone detect is wired to AXP192 GPIO: set it to input state */ |
443 | i2c_reg_write1(AXP173_BUS, AXP173_ADDR, AXP192_REG_GPIO2FUNCTION, 0x01); | 443 | i2c_reg_write1(AXP_PMU_BUS, AXP_PMU_ADDR, AXP192_REG_GPIO2FUNCTION, 0x01); |
444 | 444 | ||
445 | /* Get an initial reading before startup */ | 445 | /* Get an initial reading before startup */ |
446 | int r = i2c_reg_read1(AXP173_BUS, AXP173_ADDR, gpio_reg); | 446 | int r = i2c_reg_read1(AXP_PMU_BUS, AXP_PMU_ADDR, gpio_reg); |
447 | if(r >= 0) | 447 | if(r >= 0) |
448 | hp_detect_reg = r; | 448 | hp_detect_reg = r; |
449 | 449 | ||