Home
last modified time | relevance | path

Searched full:crc8 (Results 1 – 25 of 58) sorted by relevance

123

/linux/net/can/
H A Dgw.c104 struct cgw_csum_crc8 crc8; member
109 void (*crc8)(struct canfd_frame *cf, member
110 struct cgw_csum_crc8 *crc8);
365 struct cgw_csum_crc8 *crc8) in cgw_csum_crc8_rel() argument
367 int from = calc_idx(crc8->from_idx, cf->len); in cgw_csum_crc8_rel()
368 int to = calc_idx(crc8->to_idx, cf->len); in cgw_csum_crc8_rel()
369 int res = calc_idx(crc8->result_idx, cf->len); in cgw_csum_crc8_rel()
370 u8 crc = crc8->init_crc_val; in cgw_csum_crc8_rel()
377 for (i = crc8->from_idx; i <= crc8->to_idx; i++) in cgw_csum_crc8_rel()
378 crc = crc8->crctab[crc ^ cf->data[i]]; in cgw_csum_crc8_rel()
[all …]
/linux/include/linux/
H A Dcrc8.h21 /* see usage of this value in crc8() description */
25 * Return value of crc8() indicating valid message+crc. This is true
32 /* required table size for crc8 algorithm */
76 * crc8() - calculate a crc8 over the given input data.
81 * @crc: previous returned crc8 value.
83 * The CRC8 is calculated using the polynomial given in crc8_populate_msb()
91 * stream (including CRC8), a final return value of %CRC8_GOOD_VALUE
99 u8 crc8(const u8 table[CRC8_TABLE_SIZE], const u8 *pdata, size_t nbytes, u8 crc);
/linux/drivers/iio/chemical/
H A Dsps30_i2c.c10 #include <linux/crc8.h>
71 * PM1: upper two bytes, crc8, lower two bytes, crc8 in sps30_i2c_command()
72 * PM2P5: upper two bytes, crc8, lower two bytes, crc8 in sps30_i2c_command()
73 * PM4: upper two bytes, crc8, lower two bytes, crc8 in sps30_i2c_command()
74 * PM10: upper two bytes, crc8, lower two bytes, crc8 in sps30_i2c_command()
89 /* each two bytes are followed by a crc8 */ in sps30_i2c_command()
97 buf[i + 2] = crc8(sps30_i2c_crc8_table, buf + i, 2, CRC8_INIT_VALUE); in sps30_i2c_command()
110 crc = crc8(sps30_i2c_crc8_table, buf + i, 2, CRC8_INIT_VALUE); in sps30_i2c_command()
H A DKconfig11 select CRC8
147 select CRC8
171 select CRC8
192 select CRC8
205 select CRC8
222 select CRC8
H A Dscd30_i2c.c9 #include <linux/crc8.h>
78 /* each two bytes are followed by a crc8 */ in scd30_i2c_command()
82 crc = crc8(scd30_i2c_crc8_tbl, buf + i, 2, CRC8_INIT_VALUE); in scd30_i2c_command()
98 crc = crc8(scd30_i2c_crc8_tbl, buf + i, 2, CRC8_INIT_VALUE); in scd30_i2c_command()
H A Dsgp40.c33 #include <linux/crc8.h>
180 tg.rht_crc = crc8(sgp40_crc8_table, (u8 *)&tg.rht_ticks, 2, SGP40_CRC8_INIT); in sgp40_measure_resistance_raw()
185 tg.temp_crc = crc8(sgp40_crc8_table, (u8 *)&tg.temp_ticks, 2, SGP40_CRC8_INIT); in sgp40_measure_resistance_raw()
204 crc = crc8(sgp40_crc8_table, (u8 *)&tgres.res_ticks, 2, SGP40_CRC8_INIT); in sgp40_measure_resistance_raw()
H A Dags02ma.c13 #include <linux/crc8.h>
64 crc = crc8(ags02ma_crc8_table, (u8 *)&read_buffer.data, in ags02ma_register_read()
H A Dscd4x.c15 #include <linux/crc8.h>
163 crc = crc8(scd4x_crc8_table, buf + i, 2, CRC8_INIT_VALUE); in scd4x_read()
193 crc = crc8(scd4x_crc8_table, buf + 2, 2, CRC8_INIT_VALUE); in scd4x_write()
248 crc = crc8(scd4x_crc8_table, buf + i, 2, CRC8_INIT_VALUE); in scd4x_write_and_fetch()
H A Dsgp30.c19 #include <linux/crc8.h>
85 u8 crc8; member
215 crc = crc8(sgp_crc8_table, &data_buf[i], SGP_WORD_LEN, in sgp_verify_buffer()
/linux/lib/crc/
H A Dcrc8.c19 #include <linux/crc8.h>
68 * crc8 - calculate a crc8 over the given input data.
73 * @crc: previous returned crc8 value.
75 u8 crc8(const u8 table[CRC8_TABLE_SIZE], const u8 *pdata, size_t nbytes, u8 crc) in crc8() function
83 EXPORT_SYMBOL(crc8);
85 MODULE_DESCRIPTION("CRC8 (by Williams, Ross N.) function");
H A DKconfig17 config CRC8 config
20 The CRC8 library functions. Select this if your module uses any of
21 the functions from <linux/crc8.h>.
/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/include/uapi/linux/can/
H A Dgw.h74 CGW_CS_CRC8, /* set data[] CRC8 checksum into data[index] */
145 /* CRC8 profiles (compute CRC for additional data elements - see below) */
198 * Set a CRC8 value into data[result-idx] using a given 256 byte CRC8 table,
202 * The CRC8 checksum is calculated like this:
/linux/drivers/mfd/
H A Dtps6594-spi.c13 #include <linux/crc8.h>
49 if (tps->use_crc && buf[3] != crc8(tps6594_spi_crc_table, buf, 3, CRC8_INIT_VALUE)) in tps6594_spi_reg_read()
69 buf[3] = crc8(tps6594_spi_crc_table, buf, count++, CRC8_INIT_VALUE); in tps6594_spi_reg_write()
H A Dmt6360-core.c9 #include <linux/crc8.h>
69 /* prealloca read size = i2c device addr + i2c reg addr + val ... + crc8 */
71 /* prealloca write size = i2c device addr + i2c reg addr + val ... + crc8 + dummy byte */
441 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()
H A Dtps6594-i2c.c13 #include <linux/crc8.h>
75 if (buf_rx[1] != crc8(tps6594_i2c_crc_table, crc_data, sizeof(crc_data), CRC8_INIT_VALUE)) in tps6594_i2c_reg_read_with_crc()
103 buf[msg.len - 1] = crc8(tps6594_i2c_crc_table, crc_data, sizeof(crc_data), CRC8_INIT_VALUE); in tps6594_i2c_reg_write_with_crc()
/linux/drivers/iio/addac/
H A DKconfig11 select CRC8
26 select CRC8
/linux/drivers/crypto/intel/qat/qat_common/
H A Dadf_pfvf_utils.c3 #include <linux/crc8.h>
21 return crc8(pfvf_crc8_table, buf, buf_len, CRC8_INIT_VALUE); in adf_pfvf_calc_blkmsg_crc()
/linux/drivers/hwmon/pmbus/
H A Dadm1266.c10 #include <linux/crc8.h>
122 crc = crc8(pmbus_crc_table, &addr, 1, 0); in adm1266_pmbus_block_xfer()
123 crc = crc8(pmbus_crc_table, msgs[0].buf, msgs[0].len, crc); in adm1266_pmbus_block_xfer()
126 crc = crc8(pmbus_crc_table, &addr, 1, crc); in adm1266_pmbus_block_xfer()
127 crc = crc8(pmbus_crc_table, msgs[1].buf, msgs[1].buf[0] + 1, crc); in adm1266_pmbus_block_xfer()
/linux/drivers/iio/pressure/
H A Dsdp500.c9 #include <linux/crc8.h>
64 calculated_crc = crc8(sdp500_crc8_table, rxbuf, in sdp500_read_raw()
H A DKconfig144 select CRC8
259 select CRC8
/linux/drivers/iio/humidity/
H A Dhdc3020.c16 #include <linux/crc8.h>
211 crc = crc8(hdc3020_crc8_table, buf, 2, CRC8_INIT_VALUE); in hdc3020_read_be16()
237 crc = crc8(hdc3020_crc8_table, buf, 2, CRC8_INIT_VALUE); in hdc3020_read_measurement()
242 crc = crc8(hdc3020_crc8_table, buf + 3, 2, CRC8_INIT_VALUE); in hdc3020_read_measurement()
348 buf[4] = crc8(hdc3020_crc8_table, buf + 2, 2, CRC8_INIT_VALUE); in hdc3020_update_heater()
468 buf[4] = crc8(hdc3020_crc8_table, buf + 2, 2, CRC8_INIT_VALUE); in _hdc3020_write_thresh()
/linux/drivers/i2c/
H A Di2c-core-smbus.c30 static u8 crc8(u16 data) in crc8() function
43 * i2c_smbus_pec - Incremental CRC8 over the given input data array
44 * @crc: previous return crc8 value
48 * Incremental CRC8 over count bytes in the array pointed to by p
55 crc = crc8((crc ^ p[i]) << 8); in i2c_smbus_pec()
/linux/drivers/net/ethernet/adi/
H A DKconfig23 select CRC8
/linux/drivers/nvmem/layouts/
H A DKconfig13 select CRC8

123