Lines Matching refs:data
27 * current to copy the data from the scratchpad to EEPROM. If it is enabled
71 static int w1_f1C_refresh_block(struct w1_slave *sl, struct w1_f1C_data *data,
77 if (data->validcrc & (1 << block))
81 data->validcrc = 0;
89 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE);
92 if (crc16(CRC16_INIT, &data->memory[off], W1_PAGE_SIZE) == CRC16_VALID)
93 data->validcrc |= (1 << block);
98 static int w1_f1C_read(struct w1_slave *sl, int addr, int len, char *data)
111 return w1_read_block(sl->master, data, len);
119 struct w1_f1C_data *data = sl->family_data;
132 if (w1_f1C_refresh_block(sl, data, i)) {
137 memcpy(buf, &data->memory[off], count);
153 * @data: The data to write
156 * The data must be on one page.
161 static int w1_f1C_write(struct w1_slave *sl, int addr, int len, const u8 *data)
170 /* Write the data to the scratchpad */
179 w1_write_block(sl->master, data, len);
188 /* Compare what was read against the data written */
190 (rdbuf[2] != es) || (memcmp(data, &rdbuf[3], len) != 0))
203 * for writing the data from the scratchpad to EEPROM
215 /* invalidate cached data */
258 /* Can only write data to one page at a time */
315 /* Write the PIO data */
384 struct w1_f1C_data *data = NULL;
387 data = kzalloc(sizeof(struct w1_f1C_data), GFP_KERNEL);
388 if (!data)
390 sl->family_data = data;