Home | History | Annotate | Download | only in dev

Lines Matching refs:resp

270 	uint8_t resp[16];
336 pmu_send(sc, PMU_SYSTEM_READY, 1, cmd, 16, resp);
339 if (pmu_send(sc, PMU_GET_VERSION, 0, cmd, 16, resp) > 1)
340 aprint_normal(" rev. %d", resp[1]);
390 memset(resp, 0, 6);
391 if (pmu_send(sc, PMU_READ_BRIGHTNESS, 1, cmd, 16, resp) > 1) {
392 sc->sc_brightness_wanted = resp[1];
449 uint8_t pmu_imask, resp[16];
455 pmu_send(sc, PMU_SET_IMASK, 1, &pmu_imask, 16, resp);
631 uint8_t resp[16];
636 len = pmu_send(sc, PMU_INT_ACK, 0, NULL, 16, resp);
637 if ((len < 1) || (resp[1] == 0))
641 DPRINTF("intr: %02x", resp[0]);
643 DPRINTF(" %02x", resp[i]);
647 if (resp[1] & PMU_INT_ADB) {
648 pmu_adb_handler(sc, len - 1, &resp[1]);
651 if (resp[1] & PMU_INT_SNDBRT) {
653 DPRINTF("brightness: %d volume %d\n", resp[2], resp[3]);
654 sc->sc_brightness_wanted = resp[2];
655 sc->sc_volume_wanted = resp[3];
659 if (resp[1] & PMU_INT_PCEJECT) {
661 DPRINTF("card eject %d\n", resp[3]);
662 atomic_or_32(&sc->sc_pending, (resp[3] & 3));
666 if (resp[1] & PMU_INT_BATTERY) {
670 printf(" %02x", resp[i]);
674 if (resp[1] & PMU_INT_ENVIRONMENT) {
680 printf(" %02x", resp[i]);
683 diff = (resp[2] ^ sc->sc_env_old ) & sc->sc_env_mask;
685 sc->sc_env_old = resp[2];
687 sc->sc_lid_closed = (resp[2] & PMU_ENV_LID_CLOSED) != 0;
692 sc->sc_button = (resp[2] & PMU_ENV_POWER_BUTTON) != 0;
698 if (resp[1] & PMU_INT_TICK) {
705 printf("pmu intr: %02x:", resp[1]);
707 printf(" %02x", resp[i]);
723 uint8_t resp[16];
727 pmu_send(sc, PMU_READ_RTC, 0, NULL, 16, resp);
729 memcpy(&sec, &resp[1], 4);
751 uint8_t resp[16];
754 if (pmu_send(sc, PMU_SET_RTC, 4, (uint8_t *)&sec, 16, resp) >= 0)
764 uint8_t resp[16];
769 if (pmu_send(sc, PMU_POWER_OFF, 4, cmd, 16, resp) >= 0)
777 uint8_t resp[16];
782 if (pmu_send(sc, PMU_RESET_CPU, 0, NULL, 16, resp) >= 0)
790 uint8_t resp[16], cmd[2] = {0, 0};
797 pmu_send(sc, PMU_POWER_CTRL0, 1, cmd, 16, resp);
806 uint8_t resp[16];
812 pmu_send(sc, PMU_ADB_CMD, 4, cmd, 16, resp);
814 pmu_send(sc, PMU_ADB_POLL_OFF, 0, NULL, 16, resp);
823 uint8_t resp[16];
835 pmu_send(sc, PMU_ADB_CMD, 4, cmd, 16, resp);
847 uint8_t packet[16], resp[16];
855 (void)pmu_send(sc, PMU_ADB_CMD, len + 3, packet, 16, resp);
888 uint8_t resp[16];
901 len = pmu_send(sc, PMU_I2C_CMD, 7, command, 16, resp);
902 DPRINTF("resp1(%d): %2x %2x ", len, resp[0], resp[1]);
907 len = pmu_send(sc, PMU_I2C_CMD, 1, command, 16, resp);
908 if (resp[1] != 0xfe) {
926 len = pmu_send(sc, PMU_I2C_CMD, send_len + 7, command, 16, resp);
927 DPRINTF("resp1(%d): %2x %2x ", len, resp[0], resp[1]);
932 len = pmu_send(sc, PMU_I2C_CMD, 7, command, 16, resp);
933 DPRINTF("resp2(%d): %2x %2x ", len, resp[0], resp[1]);
938 len = pmu_send(sc, PMU_I2C_CMD, 1, command, 16, resp);
939 if (resp[1] != 0xfe) {
948 DPRINTF("resp3(%d): %2x %2x %2x ", len, resp[0], resp[1],
949 resp[2]);
956 memcpy(_recv, &resp[2], len - 2);
972 len = pmu_send(sc, PMU_I2C_CMD, len, command, 16, resp);
973 DPRINTF("resp(%d): %2x %2x\n", len, resp[0], resp[1]);
975 if (resp[1] != PMU_I2C_STATUS_OK) {
976 DPRINTF("%s: iic error %d\n", __func__, resp[1]);
997 uint8_t cmd[2], resp[16];
1014 pmu_send(sc, PMU_POWER_CTRL, 1, cmd, 16, resp);
1024 pmu_send(sc, PMU_POWER_CTRL, 1, cmd, 16, resp);
1036 pmu_send(sc, PMU_SET_BRIGHTNESS, 1, cmd, 16, resp);