Lines Matching refs:pmdata
402 pm_pmgrop_pm1(PMData *pmdata)
419 switch (pmdata->command) {
461 pm_cmd = (u_char)(pmdata->command & 0xff);
481 num_pm_data = pmdata->num_data;
486 pm_buf = (u_char *)pmdata->s_buf;
507 pmdata->command = pm_data;
513 pmdata->num_data = num_pm_data;
516 pm_buf = (u_char *)pmdata->r_buf;
546 PMData pmdata;
553 pmdata.command = 0x78;
554 pmdata.num_data = 0;
555 pmdata.data[0] = pmdata.data[1] = 0;
556 pmdata.s_buf = &pmdata.data[2];
557 pmdata.r_buf = &pmdata.data[2];
558 rval = pm_pmgrop_pm1(&pmdata);
568 if ((pmdata.data[2] & 0x10) == 0x10) {
569 if ((pmdata.data[2] & 0x0f) == 0) {
571 pm_adb_get_TALK_result(&pmdata);
572 } else if ((pmdata.data[2] & 0x08) == 0x8) {
574 pm_adb_poll_next_device_pm1(&pmdata);
575 } else if ((pmdata.data[2] & 0x04) == 0x4) {
577 pm_adb_get_ADB_data(&pmdata);
583 rval, pmdata.num_data, pmdata.data);
670 pm_pmgrop_pm2(PMData *pmdata)
691 switch (pmdata->command) {
694 pm_cmd = (u_char)(pmdata->command & 0xff);
719 num_pm_data = pmdata->num_data;
724 pmdata->command = 0;
731 pm_buf = (u_char *)pmdata->s_buf;
741 pmdata->num_data = pm_num_rx_data;
748 pm_data = pmdata->command;
756 pmdata->command = pm_data;
762 pmdata->command = pm_data;
773 pmdata->num_data = num_pm_data;
778 pmdata->num_data = num_pm_data;
782 pm_buf = (u_char *)pmdata->r_buf;
808 PMData pmdata;
814 pmdata.command = 0x78;
815 pmdata.num_data = 0;
816 pmdata.s_buf = &pmdata.data[2];
817 pmdata.r_buf = &pmdata.data[2];
818 rval = pm_pmgrop_pm2(&pmdata);
828 switch ((u_int)(pmdata.data[2] & 0xff)) {
836 pm_LCD_brightness = (u_int)pmdata.data[3] & 0xff;
837 pm_LCD_contrast = (u_int)pmdata.data[4] & 0xff;
839 pm_printerr("#08", rval, pmdata.num_data, pmdata.data);
840 pmdata.command = 0x33;
841 pmdata.num_data = 1;
842 pmdata.s_buf = pmdata.data;
843 pmdata.r_buf = pmdata.data;
844 pmdata.data[0] = pm_LCD_contrast;
845 rval = pm_pmgrop_pm2(&pmdata);
846 pm_printerr("#33", rval, pmdata.num_data, pmdata.data);
849 pmdata.command = 0x41;
850 pmdata.num_data = 1;
851 pmdata.s_buf = pmdata.data;
852 pmdata.r_buf = pmdata.data;
858 pmdata.data[0] = pm_LCD_brightness;
859 rval = pm_pmgrop_pm2(&pmdata);
863 pm_adb_get_TALK_result(&pmdata);
868 pm_adb_get_ADB_data(&pmdata);
874 pmdata.data[2], pmdata.num_data,
875 pmdata.data);
888 pm_pmgrop_mrg(PMData *pmdata)
897 : "g" (pmdata)
908 pmgrop(PMData *pmdata)
912 return (pm_pmgrop_pm1(pmdata));
915 return (pm_pmgrop_pm2(pmdata));
918 /* return (pmgrop_mrg(pmdata)); */
971 PMData pmdata;
984 pmdata.command = 0x20;
985 pmdata.s_buf = pmdata.data;
986 pmdata.r_buf = pmdata.data;
990 pmdata.num_data = buffer[0] + 3;
992 pmdata.num_data = 3;
995 pmdata.data[0] = (u_char)(command & 0xff);
996 pmdata.data[1] = 0;
999 pmdata.data[2] = buffer[0]; /* number of data */
1001 pmdata.data[3 + i] = buffer[1 + i];
1003 pmdata.data[2] = 0;
1005 pmdata.data[2] = 0;
1009 packet.data[0] = 1 + pmdata.data[2];
1011 for (i = 0; i < pmdata.data[2]; i++)
1012 packet.data[i+2] = pmdata.data[i+3];
1024 rval = pmgrop(&pmdata);
1066 pmdata.command = 0x20;
1067 pmdata.num_data = 4;
1068 pmdata.s_buf = pmdata.data;
1069 pmdata.r_buf = pmdata.data;
1070 pmdata.data[0] = 0x00;
1071 pmdata.data[1] = 0x86; /* magic spell for awaking the PM */
1072 pmdata.data[2] = 0x00;
1073 pmdata.data[3] = 0x0c; /* each bit may express the existent ADB device */
1075 pmdata.command = 0x20;
1076 pmdata.num_data = 3;
1077 pmdata.s_buf = pmdata.data;
1078 pmdata.r_buf = pmdata.data;
1079 pmdata.data[0] = (u_char)(command & 0xf0) | 0xc;
1080 pmdata.data[1] = 0x04;
1081 pmdata.data[2] = 0x00;
1083 rval = pmgrop(&pmdata);
1091 pm_adb_get_TALK_result(PMData *pmdata)
1097 packet.data[0] = pmdata->num_data-1;
1098 packet.data[1] = pmdata->data[3];
1100 packet.data[i+2] = pmdata->data[i+4];
1119 pm_adb_get_ADB_data(PMData *pmdata)
1125 packet.data[0] = pmdata->num_data-1; /* number of raw data */
1126 packet.data[1] = pmdata->data[3]; /* ADB command */
1128 packet.data[i+2] = pmdata->data[i+4];
1136 pm_adb_poll_next_device_pm1(PMData *pmdata)
1145 ndid = (ADB_CMDADDR(pmdata->data[3]) + i) & 0xf;