misc: atsha204a: Remove duplicate CRC-16 implementation
authorPali Rohár <pali@kernel.org>
Tue, 12 Apr 2022 09:20:44 +0000 (11:20 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 21 Apr 2022 18:32:40 +0000 (14:32 -0400)
commit467f0c4dc236744f4555ea9356ecd7f9819a9543
treeb6cbe06ca61fb437f23cfe830951f8f4a8005fdc
parent4f0e77f8f098753bd9835d5a31c435aaab79dd86
misc: atsha204a: Remove duplicate CRC-16 implementation

ATSHA204A uses bit-reversed checksum of standard CRC-16 with polynomial
x^16 + x^15 + x^2 + 1.

This ATSHA204A specific checksum can be calculated just by using common
U-Boot functions bitrev16() and crc16().

So replace custom driver CRC-16 implementation by common U-Boot functions.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/misc/Kconfig
drivers/misc/atsha204a-i2c.c