Lines Matching refs:mem
132 static int pcf8583_read_mem(struct i2c_client *client, struct rtc_mem *mem) in pcf8583_read_mem() argument
144 .len = mem->nr, in pcf8583_read_mem()
145 .buf = mem->data, in pcf8583_read_mem()
149 if (mem->loc < 8) in pcf8583_read_mem()
152 addr[0] = mem->loc; in pcf8583_read_mem()
157 static int pcf8583_write_mem(struct i2c_client *client, struct rtc_mem *mem) in pcf8583_write_mem() argument
162 if (mem->loc < 8 || mem->nr > 8) in pcf8583_write_mem()
165 buf[0] = mem->loc; in pcf8583_write_mem()
166 memcpy(buf + 1, mem->data, mem->nr); in pcf8583_write_mem()
168 ret = i2c_master_send(client, buf, mem->nr + 1); in pcf8583_write_mem()
169 return ret == mem->nr + 1 ? 0 : -EIO; in pcf8583_write_mem()
176 struct rtc_mem mem = { in pcf8583_rtc_read_time() local
199 pcf8583_read_mem(client, &mem)) in pcf8583_rtc_read_time()