drivers: imply CRC where applicable

Do not depend on CRC, imply it, as it is disabled by default now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2023-08-16 18:01:51 +00:00 committed by Johan Hedberg
commit 66b0472d6f
4 changed files with 5 additions and 0 deletions

View file

@ -7,6 +7,7 @@ menuconfig ETH_ADIN2111
depends on DT_HAS_ADI_ADIN2111_ENABLED || DT_HAS_ADI_ADIN1110_ENABLED depends on DT_HAS_ADI_ADIN2111_ENABLED || DT_HAS_ADI_ADIN1110_ENABLED
select SPI select SPI
select MDIO select MDIO
imply CRC
help help
The ADIN2111 is a low power, 2-port 10BASE-T1L transceiver The ADIN2111 is a low power, 2-port 10BASE-T1L transceiver
designed for industrial Ethernet applications, and is compliant with designed for industrial Ethernet applications, and is compliant with

View file

@ -11,6 +11,7 @@ menuconfig ETH_STM32_HAL
select USE_STM32_HAL_ETH select USE_STM32_HAL_ETH
select NOCACHE_MEMORY if SOC_SERIES_STM32H7X && CPU_CORTEX_M7 select NOCACHE_MEMORY if SOC_SERIES_STM32H7X && CPU_CORTEX_M7
select HWINFO select HWINFO
imply CRC
help help
Enable STM32 HAL based Ethernet driver. It is available for Enable STM32 HAL based Ethernet driver. It is available for
all Ethernet enabled variants of the F2, F4, F7 and H7 series. all Ethernet enabled variants of the F2, F4, F7 and H7 series.

View file

@ -15,6 +15,7 @@ if ICP10125
config ICP10125_CHECK_CRC config ICP10125_CHECK_CRC
bool "Check the CRC of measument data" bool "Check the CRC of measument data"
imply CRC
default y default y
help help
Verify the CRC checksum that appended to the measurement data. Verify the CRC checksum that appended to the measurement data.

View file

@ -178,6 +178,7 @@ static int icp10125_read_otp(const struct device *dev)
return 0; return 0;
} }
#ifdef CONFIG_ICP10125_CHECK_CRC
static int icp10125_check_crc(const uint8_t *data, const size_t len) static int icp10125_check_crc(const uint8_t *data, const size_t len)
{ {
/* Details of CRC are described in Chapter 5 Section 8 of the product /* Details of CRC are described in Chapter 5 Section 8 of the product
@ -185,6 +186,7 @@ static int icp10125_check_crc(const uint8_t *data, const size_t len)
*/ */
return crc8(data, len, CRC_POLY, 0xFF, false); return crc8(data, len, CRC_POLY, 0xFF, false);
} }
#endif
static int icp10125_measure(const struct i2c_dt_spec *i2c, const struct icp10125_cmd *cmds, static int icp10125_measure(const struct i2c_dt_spec *i2c, const struct icp10125_cmd *cmds,
const uint8_t mode, struct icp10125_sensor_data *sensor_data, const uint8_t mode, struct icp10125_sensor_data *sensor_data,