Lines Matching refs:rd
796 static void sixaxis_parse_report(struct sony_sc *sc, u8 *rd, int size)
812 if (rd[offset] >= 0xee) {
814 battery_status = (rd[offset] & 0x01) ? POWER_SUPPLY_STATUS_FULL : POWER_SUPPLY_STATUS_CHARGING;
816 u8 index = rd[offset] <= 5 ? rd[offset] : 5;
830 val = ((rd[offset+1] << 8) | rd[offset]) - 511;
834 val = 511 - ((rd[offset+5] << 8) | rd[offset+4]);
837 val = 511 - ((rd[offset+3] << 8) | rd[offset+2]);
844 static void nsg_mrxu_parse_report(struct sony_sc *sc, u8 *rd, int size)
869 input_report_key(sc->touchpad, BTN_LEFT, rd[offset] & 0x0F);
870 active = (rd[offset] >> 4);
871 relx = (s8) rd[offset+5];
872 rely = ((s8) rd[offset+10]) * -1;
880 x = rd[offset] | ((rd[offset+1] & 0x0F) << 8);
881 y = ((rd[offset+1] & 0xF0) >> 4) | (rd[offset+2] << 4);
887 contactx = rd[offset+3] & 0x0F;
888 contacty = rd[offset+3] >> 4;
919 u8 *rd, int size)
927 if ((sc->quirks & SIXAXIS_CONTROLLER) && rd[0] == 0x01 && size == 49) {
936 if (rd[1] == 0xff)
939 swap(rd[41], rd[42]);
940 swap(rd[43], rd[44]);
941 swap(rd[45], rd[46]);
942 swap(rd[47], rd[48]);
944 sixaxis_parse_report(sc, rd, size);
945 } else if ((sc->quirks & MOTION_CONTROLLER_BT) && rd[0] == 0x01 && size == 49) {
946 sixaxis_parse_report(sc, rd, size);
947 } else if ((sc->quirks & NAVIGATION_CONTROLLER) && rd[0] == 0x01 &&
949 sixaxis_parse_report(sc, rd, size);
950 } else if ((sc->quirks & NSG_MRXU_REMOTE) && rd[0] == 0x02) {
951 nsg_mrxu_parse_report(sc, rd, size);
1495 /* Set flag for all leds off, required for 3rd party INTEC controller */