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=1796385638; b=bmENvJslFE3EL3tjDvMEU8S/sOq01sRw7wmT+cv1p2Yyj6FYWFxGIErUT+fN7wmWdM1N UMpKZXMJJvI3iReFnvjAiLB/MKqvC8tMrCSDmWv5D4aJun7COR3ysn+dEwB7UmPLTiAow MXwjbo0S7Yykrbf8/hNabE7ulERxlObkkE4+qjhXF4JDAfnoopVTm0bP26pyj2CyucAv9 oKfdsJfa/n7q5+7lSDvx6ACycb40AOm+X49anEMsxWL16NcZYyC/D+YdoKA+lV9nphTTF tYCUm8bMIVJQjWPWXVtdEklwvmQe7d6/BgyLsRyrIbQseiK1TKR4DEQJ/Wl2m96xEMA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385638; 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-Type:Content-Transfer-Encoding; bh=kgnNf/rgnGLMhnEvl8y6+hpEA+0nYS9CMXuMLtRRmH8=; b=BgyOf9EFhMYF2Sr22dtyOS0xaxRzva6g+ewwCSHI5N1hOMZZBlt0M63YVZj+/yyNoNwb jpumYLNMfcKeof6bNmvw7w2DXIV/bCr3Q8m5K9o/ONNn9hyJ1V+Idb90xI389HmUV0JXE /S5Z0hZKxh35J/T72ySgPLLdflJ0/J+locYhZhTwlvHW9dpxDT1VXjwBhotFdwxaztV3R RH2JGqlfG2kvLQoLfwDoI3Ua9rUlvd5bAiPfONHdQst1UbMf2HC3vFx93hJb28ZWhPd2F 2fn56MHZRoNVD3abAakXjebO1xCgaVjN5TsIe0ju/i5eubx3N+0grMF9jyxU0CvrDlw== 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="jJipF5S/"; 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 A5EA6606A322; Fri, 4 Dec 2026 12:00:38 +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=jJipF5S/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2191A1F000C2; Fri, 4 Dec 2026 12:00:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385638; bh=kgnNf/rgnGLMhnEvl8y6+hpEA+0nYS9CMXuMLtRRmH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jJipF5S/AT3aJ/PriYkQd7SnUaDU6Zbpld9bBvytGNtnp2VJgS/YgYs6txBNBV51N fQHDERJ+gpSTLDB0UNT9rloj6TA93Hb9c8ua0uRwnCC1A5tbL+43xNQy2qwQP62GcZ ERpdJblXe7JUw3ptj7lKoDdP2rgYXMQP6THIslJY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , Josef Bacik , =?UTF-8?q?Nuno=20S=C3=A1?= , Jonathan Cameron Subject: [PATCH 6.6 0629/1167] iio: addac: ad74413r: fix the values of set_multiple Date: Fri, 4 Dec 2026 19:00:56 +0900 Message-ID: <20261204100718.444287561@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: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josef Bacik commit e6dfbd84b833ed595a5236b027357e917de28260 upstream. ad74413r_gpio_set_multiple() walks over the lines in the mask and looks up the new value of each with if (*bits & offset) offset is the number of the line, not a bit mask. Line 0 is always driven low, line 1 gets the value meant for line 0, line 2 the one meant for line 1, and line 3 is driven high if either of these two is. Test the bit which belongs to the line. Fixes: fea251b6a5db ("iio: addac: add AD74413R driver") Cc: stable Signed-off-by: Josef Bacik Signed-off-by: Greg Kroah-Hartman Reviewed-by: Nuno Sá Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/addac/ad74413r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/addac/ad74413r.c +++ b/drivers/iio/addac/ad74413r.c @@ -312,7 +312,7 @@ static void ad74413r_gpio_set_multiple(s return; real_mask |= BIT(real_offset); - if (*bits & offset) + if (test_bit(offset, bits)) real_bits |= BIT(real_offset); }