Lines Matching defs:packet
46 * struct mchp_otpc_packet - OTPC packet data structure
48 * @id: packet ID
49 * @offset: packet offset (in words) in OTP memory
60 struct mchp_otpc_packet *packet;
65 list_for_each_entry(packet, &otpc->packets, list) {
66 if (packet->id == id)
67 return packet;
89 /* Wait for packet to be transferred into temporary buffers. */
102 * 0x0 +------------+ <-- packet 0
109 * offset1 +------------+ <-- packet 1
116 * offset2 +------------+ <-- packet 2
120 * offsetN +------------+ <-- packet N
132 * The access to memory is done on a per packet basis: the control registers
133 * need to be updated with an offset address (within a packet range) and the
135 * that packet. E.g. if control registers are updated with any address within
137 * with packet 1. Header data is accessible though MCHP_OTPC_HR register.
143 * packet. The user will have to be aware of the memory footprint before doing
150 struct mchp_otpc_packet *packet;
159 * unsigned integer numbers for packet id, thus devide off by 4
162 packet = mchp_otpc_id_to_packet(otpc, off / 4);
163 if (!packet)
165 offset = packet->offset;
195 struct mchp_otpc_packet *packet;
212 packet = devm_kzalloc(otpc->dev, sizeof(*packet), GFP_KERNEL);
213 if (!packet)
216 packet->id = id++;
217 packet->offset = word_pos;
218 INIT_LIST_HEAD(&packet->list);
219 list_add_tail(&packet->list, &otpc->packets);
223 /* Next word: this packet (header, payload) position + 1. */