Lines Matching refs:chksum
21 int chksum; in read_eeprom() local
53 for (chksum = 0, i = 0; i < sizeof(*info)-2; i++) in read_eeprom()
54 chksum += buf[i]; in read_eeprom()
55 if ((info->chksum[0] != chksum>>8) || in read_eeprom()
56 (info->chksum[1] != (chksum&0xff))) { in read_eeprom()
165 int chksum; in do_econfig() local
169 for (chksum = 0, i = 0; i < sizeof(*info)-2; i++) in do_econfig()
170 chksum += buf[i]; in do_econfig()
172 (info->chksum[0] << 8) | info->chksum[1]); in do_econfig()
173 debug("new chksum:0x%04x\n", chksum); in do_econfig()
174 info->chksum[0] = chksum >> 8; in do_econfig()
175 info->chksum[1] = chksum & 0xff; in do_econfig()
185 if (gsc_i2c_write(GSC_EEPROM_ADDR, info->chksum - (u8 *)info, in do_econfig()
186 1, info->chksum, 2)) { in do_econfig()