/* Return 1 if vol_up pressed */ int target_volume_up() { uint8_t key_status; pm8921_gpio_get(0, &key_status); return key_status; }
/* Return 1 if vol_down pressed */ uint32_t target_volume_down() { uint8_t key_status; pm8921_gpio_get(1, &key_status); return key_status; }
uint8_t pmic8921_gpio_get(uint32_t gpio) { int ret = 0; uint8_t status = 0; ret = pm8921_gpio_get(PM_GPIO(gpio), &status); if (ret) { status = 0xFF; } dprintf(SPEW, "pmic8921_gpio_get ret %d status %d\n", ret, status); return status; }