Lines Matching defs:packet
111 struct ads7846_packet *packet;
702 struct ads7846_packet *packet = ts->packet;
706 packet->y = val;
709 packet->x = val;
712 packet->z1 = val;
715 packet->z2 = val;
763 struct ads7846_packet *packet = ts->packet;
768 packet->ignore = false;
769 for (cmd_idx = packet->last_cmd_idx; cmd_idx < packet->cmds - 1; cmd_idx++) {
770 struct ads7846_buf_layout *l = &packet->l[cmd_idx];
772 packet->last_cmd_idx = cmd_idx;
775 val = ads7846_get_value(&packet->rx[l->offset + b]);
785 packet->ignore = true;
796 struct ads7846_packet *packet = ts->packet;
797 struct ads7846_buf_layout *l = &packet->l[cmd_idx];
800 val = ads7846_get_value(&packet->rx[l->offset + l->count - 1]);
834 struct ads7846_packet *packet = ts->packet;
837 packet->ignore = false;
848 packet->ignore = true;
863 packet->ignore = true;
873 struct ads7846_packet *packet = ts->packet;
878 packet->last_cmd_idx = 0;
887 packet->ignore = true;
901 struct ads7846_packet *packet = ts->packet;
905 x = packet->x;
906 y = packet->y;
911 z1 = packet->z1;
912 z2 = packet->z2;
939 if (packet->ignore || Rt > ts->pressure_max) {
941 packet->ignore, Rt);
1091 struct ads7846_packet *packet = ts->packet;
1098 packet->count = 2;
1100 packet->count = 1;
1103 packet->cmds = 5; /* x, y, z1, z2, pwdown */
1105 packet->cmds = 3; /* x, y, pwdown */
1107 for (cmd_idx = 0; cmd_idx < packet->cmds; cmd_idx++) {
1108 struct ads7846_buf_layout *l = &packet->l[cmd_idx];
1111 if (cmd_idx == packet->cmds - 1) {
1115 max_count = packet->count;
1122 size += sizeof(*packet->rx) * max_count;
1129 packet->rx = devm_kzalloc(&ts->spi->dev, size, GFP_KERNEL);
1130 if (!packet->rx)
1145 for (cmd_idx = 0; cmd_idx < packet->cmds; cmd_idx++) {
1146 struct ads7846_buf_layout *l = &packet->l[cmd_idx];
1153 if (cmd_idx == packet->cmds - 1)
1159 packet->rx[l->offset + b].cmd = cmd;
1160 x->tx_buf = &packet->rx[l->offset + b].cmd;
1164 x->rx_buf = &packet->rx[l->offset + b].data;
1187 struct ads7846_packet *packet = ts->packet;
1198 packet->count_skip = DIV_ROUND_UP(count, 24);
1203 packet->count = ts->debounce_rep + 2;
1205 packet->count = 1;
1208 packet->cmds = 5; /* x, y, z1, z2, pwdown */
1210 packet->cmds = 3; /* x, y, pwdown */
1212 for (cmd_idx = 0; cmd_idx < packet->cmds; cmd_idx++) {
1213 struct ads7846_buf_layout *l = &packet->l[cmd_idx];
1216 if (cmd_idx == packet->cmds - 1)
1220 max_count = packet->count + packet->count_skip;
1222 max_count = packet->count;
1227 l->skip = packet->count_skip;
1228 size += sizeof(*packet->tx) * max_count;
1231 packet->tx = devm_kzalloc(&ts->spi->dev, size, GFP_KERNEL);
1232 if (!packet->tx)
1235 packet->rx = devm_kzalloc(&ts->spi->dev, size, GFP_KERNEL);
1236 if (!packet->rx)
1253 for (cmd_idx = 0; cmd_idx < packet->cmds; cmd_idx++) {
1254 struct ads7846_buf_layout *l = &packet->l[cmd_idx];
1257 if (cmd_idx == packet->cmds - 1)
1263 packet->tx[l->offset + b].cmd = cmd;
1266 x->tx_buf = packet->tx;
1267 x->rx_buf = packet->rx;
1359 struct ads7846_packet *packet;
1400 packet = devm_kzalloc_obj(dev, struct ads7846_packet);
1401 if (!packet)
1410 ts->packet = packet;