Lines Matching refs:pmdata
280 PMData pmdata;
326 pmdata.command = PMU_SET_IMASK;
327 pmdata.num_data = 1;
328 pmdata.s_buf = pmdata.data;
329 pmdata.r_buf = pmdata.data;
330 pmdata.data[0] = pm_imask;
331 pmgrop(&pmdata);
470 pmgrop(PMData *pmdata)
491 switch (pmdata->command) {
494 pm_cmd = (u_char)(pmdata->command & 0xff);
504 num_pm_data = pmdata->num_data;
508 pmdata->command = 0;
511 pm_buf = (u_char *)pmdata->s_buf;
521 pmdata->num_data = pm_num_rx_data;
528 pm_data = pmdata->command;
535 pmdata->command = pm_data;
544 pmdata->num_data = num_pm_data;
547 pm_buf = (u_char *)pmdata->r_buf;
573 PMData pmdata;
579 pmdata.command = PMU_INT_ACK;
580 pmdata.num_data = 0;
581 pmdata.s_buf = &pmdata.data[2];
582 pmdata.r_buf = &pmdata.data[2];
583 rval = pmgrop(&pmdata);
593 switch ((u_int)(pmdata.data[2] & 0xff)) {
601 pm_LCD_brightness = (u_int)pmdata.data[3] & 0xff;
602 pm_LCD_contrast = (u_int)pmdata.data[4] & 0xff;
605 pmdata.command = PMU_SET_BRIGHTNESS;
606 pmdata.num_data = 1;
607 pmdata.s_buf = pmdata.data;
608 pmdata.r_buf = pmdata.data;
614 pmdata.data[0] = pm_LCD_brightness;
615 rval = pmgrop(&pmdata);
620 pm_adb_get_TALK_result(&pmdata);
625 pm_adb_get_ADB_data(&pmdata);
631 pmdata.data[2], pmdata.num_data,
632 pmdata.data);
653 PMData pmdata;
666 pmdata.command = PMU_ADB_CMD;
667 pmdata.s_buf = pmdata.data;
668 pmdata.r_buf = pmdata.data;
673 pmdata.num_data = buffer[0] + 3;
675 pmdata.num_data = 3;
678 pmdata.data[0] = (u_char)(command & 0xff);
679 pmdata.data[1] = 0;
682 pmdata.data[2] = buffer[0]; /* number of data */
684 pmdata.data[3 + i] = buffer[1 + i];
686 pmdata.data[2] = 0;
688 pmdata.data[2] = 0;
692 packet.data[0] = 1 + pmdata.data[2];
694 for (i = 0; i < pmdata.data[2]; i++)
695 packet.data[i+2] = pmdata.data[i+3];
707 rval = pmgrop(&pmdata);
753 pmdata.command = PMU_ADB_CMD;
754 pmdata.num_data = 4;
755 pmdata.s_buf = pmdata.data;
756 pmdata.r_buf = pmdata.data;
757 pmdata.data[0] = 0x00;
758 pmdata.data[1] = 0x86; /* magic spell for awaking the PM */
759 pmdata.data[2] = 0x00;
760 pmdata.data[3] = 0x0c; /* each bit may express the existent ADB device */
761 rval = pmgrop(&pmdata);
769 pm_adb_get_TALK_result(PMData *pmdata)
775 packet.data[0] = pmdata->num_data-1;
776 packet.data[1] = pmdata->data[3];
778 packet.data[i+2] = pmdata->data[i+4];
797 pm_adb_get_ADB_data(PMData *pmdata)
802 if (pmu_type == PMU_OHARE && pmdata->num_data == 4 &&
803 pmdata->data[1] == 0x2c && pmdata->data[3] == 0xff &&
804 ((pmdata->data[2] & ~1) == 0xf4)) {
805 if (pmdata->data[2] == 0xf4) {
813 packet.data[0] = pmdata->num_data-1; /* number of raw data */
814 packet.data[1] = pmdata->data[3]; /* ADB command */
816 packet.data[i+2] = pmdata->data[i+4];