Home
last modified time | relevance | path

Searched refs:crc8 (Results 1 – 25 of 31) sorted by relevance

12

/linux/net/can/
H A Dgw.c105 struct cgw_csum_crc8 crc8; member
110 void (*crc8)(struct canfd_frame *cf, member
111 struct cgw_csum_crc8 *crc8);
366 struct cgw_csum_crc8 *crc8) in cgw_csum_crc8_rel() argument
368 int from = calc_idx(crc8->from_idx, cf->len); in cgw_csum_crc8_rel()
369 int to = calc_idx(crc8->to_idx, cf->len); in cgw_csum_crc8_rel()
370 int res = calc_idx(crc8->result_idx, cf->len); in cgw_csum_crc8_rel()
371 u8 crc = crc8->init_crc_val; in cgw_csum_crc8_rel()
379 crc = crc8->crctab[crc ^ cf->data[i]]; in cgw_csum_crc8_rel()
382 crc = crc8->crctab[crc ^ cf->data[i]]; in cgw_csum_crc8_rel()
[all …]
/linux/drivers/w1/slaves/
H A Dw1_ds250x.c52 u8 crc8; in w1_ds2502_read_page() local
67 crc8 = w1_read_8(sl->master); in w1_ds2502_read_page()
68 if (w1_calc_crc8(buf, 3) != crc8) in w1_ds2502_read_page()
73 crc8 = w1_read_8(sl->master); in w1_ds2502_read_page()
74 if (w1_calc_crc8(&data->eprom[pgoff], W1_PAGE_SIZE) != crc8) in w1_ds2502_read_page()
/linux/lib/crc/
H A Dcrc8.c75 u8 crc8(const u8 table[CRC8_TABLE_SIZE], const u8 *pdata, size_t nbytes, u8 crc) in crc8() function
83 EXPORT_SYMBOL(crc8);
/linux/drivers/iio/pressure/
H A Dadp810.c89 if (buf->dp_crc != crc8(crc_table, (u8 *)&buf->dp, 0x2, CRC8_INIT_VALUE)) { in adp810_measure()
94 if (buf->tmp_crc != crc8(crc_table, (u8 *)&buf->tmp, 0x2, CRC8_INIT_VALUE)) { in adp810_measure()
99 if (buf->sf_crc != crc8(crc_table, (u8 *)&buf->sf, 0x2, CRC8_INIT_VALUE)) { in adp810_measure()
H A Dsdp500.c63 calculated_crc = crc8(sdp500_crc8_table, rxbuf, in sdp500_read_raw()
H A Dicp10100.c179 crc = crc8(icp10100_crc8_table, ptr, ICP10100_CRC8_WORD_LENGTH, in icp10100_send_cmd()
/linux/drivers/iio/chemical/
H A Dscd30_i2c.c84 crc = crc8(scd30_i2c_crc8_tbl, buf + i, 2, CRC8_INIT_VALUE); in scd30_i2c_command()
100 crc = crc8(scd30_i2c_crc8_tbl, buf + i, 2, CRC8_INIT_VALUE); in scd30_i2c_command()
H A Dsps30_i2c.c96 buf[i + 2] = crc8(sps30_i2c_crc8_table, buf + i, 2, CRC8_INIT_VALUE); in sps30_i2c_command()
109 crc = crc8(sps30_i2c_crc8_table, buf + i, 2, CRC8_INIT_VALUE); in sps30_i2c_command()
H A Dscd4x.c165 crc = crc8(scd4x_crc8_table, buf + i, 2, CRC8_INIT_VALUE); in scd4x_read()
195 crc = crc8(scd4x_crc8_table, buf + 2, 2, CRC8_INIT_VALUE); in scd4x_write()
250 crc = crc8(scd4x_crc8_table, buf + i, 2, CRC8_INIT_VALUE); in scd4x_write_and_fetch()
H A Dsgp30.c84 u8 crc8; member
214 crc = crc8(sgp_crc8_table, &data_buf[i], SGP_WORD_LEN, in sgp_verify_buffer()
/linux/drivers/mfd/
H A Dtps6594-spi.c48 if (tps->use_crc && buf[3] != crc8(tps6594_spi_crc_table, buf, 3, CRC8_INIT_VALUE)) in tps6594_spi_reg_read()
68 buf[3] = crc8(tps6594_spi_crc_table, buf, count++, CRC8_INIT_VALUE); in tps6594_spi_reg_write()
H A Dtps6594-i2c.c74 if (buf_rx[1] != crc8(tps6594_i2c_crc_table, crc_data, sizeof(crc_data), CRC8_INIT_VALUE)) in tps6594_i2c_reg_read_with_crc()
102 buf[msg.len - 1] = crc8(tps6594_i2c_crc_table, crc_data, sizeof(crc_data), CRC8_INIT_VALUE); in tps6594_i2c_reg_write_with_crc()
H A Dmt6360-core.c441 crc = crc8(ddata->crc8_tbl, buf, val_size + MT6360_CRC_PREDATA_OFFSET, 0); in mt6360_regmap_read()
484 buf[val_size] = crc8(ddata->crc8_tbl, buf, val_size, 0); in mt6360_regmap_write()
/linux/include/linux/
H A Dcrc8.h99 u8 crc8(const u8 table[CRC8_TABLE_SIZE], const u8 *pdata, size_t nbytes, u8 crc);
/linux/drivers/iio/dac/
H A Dmax22007.c112 calculated_crc = crc8(max22007_crc8_table, &reg_byte, 1, 0x00); in max22007_spi_read()
113 calculated_crc = crc8(max22007_crc8_table, rx_buf, 2, calculated_crc); in max22007_spi_read()
142 st->tx_buf[count] = crc8(max22007_crc8_table, st->tx_buf, in max22007_spi_write()
/linux/drivers/crypto/intel/qat/qat_common/
H A Dadf_pfvf_utils.c21 return crc8(pfvf_crc8_table, buf, buf_len, CRC8_INIT_VALUE); in adf_pfvf_calc_blkmsg_crc()
/linux/drivers/iio/adc/
H A Dad7779.c188 st->reg_tx_buf[2] = crc8(ad7779_crc8_table, st->reg_tx_buf, in ad7779_spi_read()
198 exp_crc = crc8(ad7779_crc8_table, crc_buf, ARRAY_SIZE(crc_buf), 0); in ad7779_spi_read()
218 st->reg_tx_buf[2] = crc8(ad7779_crc8_table, st->reg_tx_buf, in ad7779_spi_write()
H A Dad4134.c138 return crc8(ad4134_spi_crc_table, buf, ARRAY_SIZE(buf), in ad4134_calc_spi_crc()
/linux/Documentation/translations/zh_CN/core-api/
H A Dkernel-api.rst142 lib/crc8.c
/linux/drivers/i2c/
H A Di2c-core-smbus.c30 static u8 crc8(u16 data) in crc8() function
55 crc = crc8((crc ^ p[i]) << 8); in i2c_smbus_pec()
/linux/drivers/soundwire/
H A Dcadence_master.c2273 crc = crc8(sdw_crc8_lookup_msb, header, header_size, crc); in sdw_cdns_prepare_write_pd0_buffer()
2290 crc = crc8(sdw_crc8_lookup_msb, data, data_size, crc); in sdw_cdns_prepare_write_pd0_buffer()
2327 crc = crc8(sdw_crc8_lookup_msb, header, header_size, crc); in sdw_cdns_prepare_read_pd0_buffer()
2651 crc = crc8(sdw_crc8_lookup_msb, &b0, 1, crc); in extract_read_data()
2654 crc = crc8(sdw_crc8_lookup_msb, &b1, 1, crc); in extract_read_data()
2663 crc = crc8(sdw_crc8_lookup_msb, &b0, 1, crc); in extract_read_data()
/linux/drivers/gpio/
H A Dgpio-max3191x.c128 val = (status & 0xf8) != crc8(max3191x_crc8, &in, 1, 0); in max3191x_readout_locked()
/linux/drivers/input/keyboard/
H A Dpinephone-keyboard.c222 crc = crc8(ppkb->crc_table, &new_buf[1], PPKB_COLS, CRC8_INIT_VALUE); in ppkb_update()
/linux/sound/soc/codecs/aw88395/
H A Daw88395_lib.c1069 act_crc8 = crc8(aw_crc8_table, aw_cfg->data + cfg_dde[i].data_offset, in aw_dev_check_cfg_by_hdr()
1128 act_crc8 = crc8(aw_crc8_table, aw_cfg->data + cfg_dde[i].data_offset, in aw_dev_check_acf_by_hdr_v1()
/linux/drivers/bluetooth/
H A Dbtnxpuart.c795 ack_nak[1] = crc8(crc8_table, ack_nak, 1, 0xff); in nxp_send_ack()
1178 crc_nak_buf.pkt.crc = crc8(crc8_table, crc_nak_buf.buf, in nxp_handle_fw_download_error()
1187 timeout_nak_buf.pkt.crc = crc8(crc8_table, timeout_nak_buf.buf, in nxp_handle_fw_download_error()

12