Lines Matching refs:resp

270 	uint8_t resp[16];  in pmu_attach()  local
333 pmu_send(sc, PMU_SYSTEM_READY, 1, cmd, 16, resp); in pmu_attach()
336 if (pmu_send(sc, PMU_GET_VERSION, 0, cmd, 16, resp) > 1) in pmu_attach()
337 aprint_normal(" rev. %d", resp[1]); in pmu_attach()
443 memset(resp, 0, 6); in pmu_attach()
444 if (pmu_send(sc, PMU_READ_BRIGHTNESS, 1, cmd, 16, resp) > 1) { in pmu_attach()
445 sc->sc_brightness_wanted = resp[1]; in pmu_attach()
502 uint8_t pmu_imask, resp[16]; in pmu_init() local
508 pmu_send(sc, PMU_SET_IMASK, 1, &pmu_imask, 16, resp); in pmu_init()
682 uint8_t resp[16]; in pmu_intr() local
687 len = pmu_send(sc, PMU_INT_ACK, 0, NULL, 16, resp); in pmu_intr()
688 if ((len < 1) || (resp[1] == 0)) in pmu_intr()
692 DPRINTF("intr: %02x", resp[0]); in pmu_intr()
694 DPRINTF(" %02x", resp[i]); in pmu_intr()
698 if (resp[1] & PMU_INT_ADB) { in pmu_intr()
699 pmu_adb_handler(sc, len - 1, &resp[1]); in pmu_intr()
702 if (resp[1] & PMU_INT_SNDBRT) { in pmu_intr()
704 DPRINTF("brightness: %d volume %d\n", resp[2], resp[3]); in pmu_intr()
705 sc->sc_brightness_wanted = resp[2]; in pmu_intr()
706 sc->sc_volume_wanted = resp[3]; in pmu_intr()
710 if (resp[1] & PMU_INT_PCEJECT) { in pmu_intr()
712 DPRINTF("card eject %d\n", resp[3]); in pmu_intr()
713 atomic_or_32(&sc->sc_pending, (resp[3] & 3)); in pmu_intr()
717 if (resp[1] & PMU_INT_BATTERY) { in pmu_intr()
721 printf(" %02x", resp[i]); in pmu_intr()
725 if (resp[1] & PMU_INT_ENVIRONMENT) { in pmu_intr()
731 printf(" %02x", resp[i]); in pmu_intr()
734 diff = (resp[2] ^ sc->sc_env_old ) & sc->sc_env_mask; in pmu_intr()
736 sc->sc_env_old = resp[2]; in pmu_intr()
738 sc->sc_lid_closed = (resp[2] & PMU_ENV_LID_CLOSED) != 0; in pmu_intr()
743 sc->sc_button = (resp[2] & PMU_ENV_POWER_BUTTON) != 0; in pmu_intr()
749 if (resp[1] & PMU_INT_TICK) { in pmu_intr()
756 printf("pmu intr: %02x:", resp[1]); in pmu_intr()
758 printf(" %02x", resp[i]); in pmu_intr()
774 uint8_t resp[16]; in pmu_todr_get() local
778 pmu_send(sc, PMU_READ_RTC, 0, NULL, 16, resp); in pmu_todr_get()
780 memcpy(&sec, &resp[1], 4); in pmu_todr_get()
802 uint8_t resp[16]; in pmu_todr_set() local
805 if (pmu_send(sc, PMU_SET_RTC, 4, (uint8_t *)&sec, 16, resp) >= 0) in pmu_todr_set()
815 uint8_t resp[16]; in pmu_poweroff() local
820 if (pmu_send(sc, PMU_POWER_OFF, 4, cmd, 16, resp) >= 0) in pmu_poweroff()
828 uint8_t resp[16]; in pmu_restart() local
833 if (pmu_send(sc, PMU_RESET_CPU, 0, NULL, 16, resp) >= 0) in pmu_restart()
841 uint8_t resp[16], cmd[2] = {0, 0}; in pmu_modem() local
848 pmu_send(sc, PMU_POWER_CTRL0, 1, cmd, 16, resp); in pmu_modem()
857 uint8_t resp[16]; in pmu_autopoll() local
863 pmu_send(sc, PMU_ADB_CMD, 4, cmd, 16, resp); in pmu_autopoll()
865 pmu_send(sc, PMU_ADB_POLL_OFF, 0, NULL, 16, resp); in pmu_autopoll()
874 uint8_t resp[16]; in pmu_adb_handler() local
886 pmu_send(sc, PMU_ADB_CMD, 4, cmd, 16, resp); in pmu_adb_handler()
898 uint8_t packet[16], resp[16]; in pmu_adb_send() local
906 (void)pmu_send(sc, PMU_ADB_CMD, len + 3, packet, 16, resp); in pmu_adb_send()
938 uint8_t resp[16]; in pmu_i2c_exec() local
949 len = pmu_send(sc, PMU_I2C_CMD, len, command, 16, resp); in pmu_i2c_exec()
950 DPRINTF("resp(%d): %2x %2x\n", len, resp[0], resp[1]); in pmu_i2c_exec()
952 if (resp[1] != PMU_I2C_STATUS_OK) { in pmu_i2c_exec()
953 DPRINTF("%s: iic error %d\n", __func__, resp[1]); in pmu_i2c_exec()
962 len = pmu_send(sc, PMU_I2C_CMD, 7, command, 16, resp); in pmu_i2c_exec()
963 DPRINTF("resp2(%d): %2x %2x\n", len, resp[0], resp[1]); in pmu_i2c_exec()
966 len = pmu_send(sc, PMU_I2C_CMD, 1, command, 16, resp); in pmu_i2c_exec()
967 DPRINTF("resp3(%d): %2x %2x %2x\n", len, resp[0], resp[1], in pmu_i2c_exec()
968 resp[2]); in pmu_i2c_exec()
975 memcpy(_recv, &resp[2], len - 2); in pmu_i2c_exec()
995 uint8_t cmd[2], resp[16]; in pmu_update_brightness() local
1012 pmu_send(sc, PMU_POWER_CTRL, 1, cmd, 16, resp); in pmu_update_brightness()
1022 pmu_send(sc, PMU_POWER_CTRL, 1, cmd, 16, resp); in pmu_update_brightness()
1034 pmu_send(sc, PMU_SET_BRIGHTNESS, 1, cmd, 16, resp); in pmu_update_brightness()