summaryrefslogtreecommitdiff
path: root/include/linux/crc16.h
blob: 9443c084f8811d79bbd7904ff14f95fe2ecee42c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 *	crc16.h - CRC-16 routine
 *
 * Implements the standard CRC-16:
 *   Width 16
 *   Poly  0x8005 (x^16 + x^15 + x^2 + 1)
 *   Init  0
 *
 * Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com>
 *
 * This source code is licensed under the GNU General Public License,
 * Version 2. See the file COPYING for more details.
 */

#ifndef __CRC16_H
#define __CRC16_H

#include <linux/types.h>

extern u16 const crc16_table[256];

extern u16 crc16(u16 crc, const u8 *buffer, size_t len);

static inline u16 crc16_byte(u16 crc, const u8 data)
{
	return (crc >> 8) ^ crc16_table[(crc ^ data) & 0xff];
}

#endif /* __CRC16_H */

mmit/Documentation/i2c/busses/i2c-i801?h=linux-6.6.y&id=cb09d943c70da7c8097006db1dc163b2d99338f6'>i2c: i801: Add support for Intel Cedar ForkJarkko Nikula 2017-06-19i2c: i801: Add support for Intel Cannon LakeSrinivas Pandruvada 2017-02-09i2c: i801: Add support for Intel Gemini LakeMika Westerberg 2015-11-20i2c: i801: add Intel Lewisburg device IDsAlexandra Yates 2015-10-26i2c: i801: Document Intel DNV and BroxtonJarkko Nikula 2014-11-12i2c: i801: Add DeviceIDs for SunrisePoint LPDevin Ryles 2014-10-16i2c: i801: Add Device IDs for Intel Sunrise Point PCHjames.d.ralston@intel.com 2014-07-17i2c: i801: Add device ID for Intel Wildcat Point PCHJean Delvare 2014-03-09i2c: i801: enable Intel BayTrail SMBUSChew, Kean ho 2014-01-29Update Jean Delvare's e-mail addressJean Delvare 2013-11-14i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCHJames Ralston 2013-06-20i2c: i801: SMBus patch for Intel Coleto Creek DeviceIDsSeth Heasley