From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796385788; b=akLMi9ipZq378aK5MIUNVKYCGmv07+FJoHnUELpzfv9vQ8E20QAhIbrfDN7SgExt+//O NpmO01G+kxCiQWrOGm2o26In8BNxjAEsohHSf8TbytGAULsUVAF1OaqiecONu5UyxF9mb sYHZbrNp2hVJWNEc11an8Lgai11sRLfewRtrWZRXTq1A53dUFm6iudanfyug3T2GFSWj/ HGGzT9Kc/Jzg8jRXS1fgMIvUmLPFGHszmmQOQqRzvHXpkplI/hdwe4ff7t2kLovtrvXUZ SWVUY4Y6i3X2EHIukQCIwhSrxK5xGe0WiMtwTaNAP1GIkdNp0+r4iYHnr2EATHjHvPw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385788; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=ctReICfyXWnQ4ZQKiHgh/nUQpbvAljnhKteByaSufkA=; b=RAuEono/Je/h+HUq0UOkswR41WyYb3Qi1CRMiI0VOPc80golWMhq06GDgK2/4zYV/xaT ui2fcmliyJuxwRisNCL5oWbtSxbWzF8BI0wWUIWs19x57qo/xgVUtwxY2GVyuhFU8qg23 6GuzIDCeEPE5ZIzE+sWrZh+sC9uh6dfTBncCN6bqqB0crNQYanmGaSd6obviVK2r8j2OI KnjqmHNWgxr+t90/f2Xee2/wsXnWzP9EkP2ybM6vqnOt6tG7nebiVHFnAiH8EvuS7CUla plfIFZ5s9mawgNOkgM3Z8wOXxQ9+V4e/G/JQCljOm0Mrb6KU8obhMIk7KQ54SL+fWew== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=pl9bYHda; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E058606A696; Fri, 4 Dec 2026 12:03:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=pl9bYHda Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9766B1F00A0E; Fri, 4 Dec 2026 12:03:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385788; bh=ctReICfyXWnQ4ZQKiHgh/nUQpbvAljnhKteByaSufkA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pl9bYHdaSUT5XT0GTWMdeHYi/uF2X13aAsS8TGnu2TQAkEYnLAJmMzjfNoA2JkpuE 1XVSIuLkcdgnDLVVzSYDtFgqIoIHVpLRCPggANxAHhmivREUt/DIgcovCd0yZoZBpR B4oLdd97HfdE+JHyY42XoHeSfESm/LlvTuK9o58A= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Salah Triki , Jonathan Cameron Subject: [PATCH 6.6 0694/1167] iio: temperature: mlx90614: Fix dual channel probe condition check Date: Fri, 4 Dec 2026 19:02:01 +0900 Message-ID: <20261204100720.141719434@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Salah Triki commit 4d4e75b3074bc29525c963a81c19471528f29a45 upstream. In mlx90614_probe_num_ir_sensors(), the check on chip_info->dual_channel is inverted. Currently, if dual_channel is true (MLX90614), the function returns 0 immediately without checking op_eeprom_config1. This forces all MLX90614 devices to be registered as single sensor (num_channels = 2), making the second object temperature channel inaccessible. Conversely, if dual_channel is false (MLX90615), the function skips the early return and performs an unnecessary SMBus read on EEPROM CONFIG1 even though MLX90615 does not support dual channel operation. Fix this by negating the condition so that single-channel chips return early with 0, while dual-channel capable chips (MLX90614) proceed to read the EEPROM configuration register to detect whether 1 or 2 object channels are present. Fixes: 3d5ead238bc8 ("iio: mlx90614: Factor our register IO and constants into model specific descriptor") Signed-off-by: Salah Triki Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/temperature/mlx90614.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/temperature/mlx90614.c +++ b/drivers/iio/temperature/mlx90614.c @@ -570,7 +570,7 @@ static int mlx90614_probe_num_ir_sensors const struct mlx_chip_info *chip_info = data->chip_info; s32 ret; - if (chip_info->dual_channel) + if (!chip_info->dual_channel) return 0; ret = i2c_smbus_read_word_data(client, chip_info->op_eeprom_config1);