Merge tag 'iio-fixes-for-5.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: Second set of IIO fixes for the 5.2 cycle. * ad7150 - sense of bit for controlling adaptive vs fixed threshold was flipped. * adt7316 - Fix a build issue due to wrong headers for gpio usage. * lsm6dsx - correctly suspend / resume i2c slaves when the host goes to sleep. * mlx90632 - relax a compatability check to allow for newer devices. Also one counters fix * counter/ftm-quaddec - missing dependencies in Kconfig. * tag 'iio-fixes-for-5.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: counter/ftm-quaddec: Add missing dependencies in Kconfig staging: iio: adt7316: Fix build errors when GPIOLIB is not set iio: temperature: mlx90632 Relax the compatibility check iio: imu: st_lsm6dsx: fix PM support for st_lsm6dsx i2c controller staging:iio:ad7150: fix threshold mode config bit
This commit is contained in:
@@ -81,6 +81,8 @@
|
||||
/* Magic constants */
|
||||
#define MLX90632_ID_MEDICAL 0x0105 /* EEPROM DSPv5 Medical device id */
|
||||
#define MLX90632_ID_CONSUMER 0x0205 /* EEPROM DSPv5 Consumer device id */
|
||||
#define MLX90632_DSP_VERSION 5 /* DSP version */
|
||||
#define MLX90632_DSP_MASK GENMASK(7, 0) /* DSP version in EE_VERSION */
|
||||
#define MLX90632_RESET_CMD 0x0006 /* Reset sensor (address or global) */
|
||||
#define MLX90632_REF_12 12LL /**< ResCtrlRef value of Ch 1 or Ch 2 */
|
||||
#define MLX90632_REF_3 12LL /**< ResCtrlRef value of Channel 3 */
|
||||
@@ -667,10 +669,13 @@ static int mlx90632_probe(struct i2c_client *client,
|
||||
} else if (read == MLX90632_ID_CONSUMER) {
|
||||
dev_dbg(&client->dev,
|
||||
"Detected Consumer EEPROM calibration %x\n", read);
|
||||
} else if ((read & MLX90632_DSP_MASK) == MLX90632_DSP_VERSION) {
|
||||
dev_dbg(&client->dev,
|
||||
"Detected Unknown EEPROM calibration %x\n", read);
|
||||
} else {
|
||||
dev_err(&client->dev,
|
||||
"EEPROM version mismatch %x (expected %x or %x)\n",
|
||||
read, MLX90632_ID_CONSUMER, MLX90632_ID_MEDICAL);
|
||||
"Wrong DSP version %x (expected %x)\n",
|
||||
read, MLX90632_DSP_VERSION);
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user