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=1796388466; b=S9LFwLUA1H3osMwsrsMtRIH7lW7rx+/a7pVN7Hy5iUAIYegLc0Suvg0S84E3QnFEVYM4 C1WVIc4m4jX39kiNvMca9NADUGw3xdkbDeiim3aXJ9vo3uIRA5o35LMKQ0Wlv7A1TX/rf BkJwcscKeXPWnXsFGdtXiKFt0zcTSsU/LhEXZFhxn3VlDbVD1SrqqJeDAhll/DpqbbRWO iAR2GtdoQaSx3Yg7SqcBCp9UkljKXn0LzFePn0Npm9EOG67O69ocWhrmR7iLz/Fjo3BYV Bun6TkhAW4gBZVQ2znjDi/rkCydc7spDrNhuMQZdwRpn34IttozJy6aKeHgLafA4nrA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388466; 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=GaR7pbTuiBgb5PORme6kFdr0wuGob7+9WnD5I8Qli70=; b=rSohzuV7Nh4HtrJ5bRC6S6pM+nOsjnw8kUJxL7CHJYRNTaxKEG6inkPcdTB2VCiTPQQF 1AwEamweFpbnJU+cg0XWBUnLSR/XPZNOqvtVVQtYD0aLqH8lBYgjiagiwvzi5/L9AApwy MocxR7GuSTRZOiRwehKOs+o0f+cQOcdMpCyv1wCwX7spsFSwp7hKj/gxE5WWAn/LuyFuq V9a3gkhifrUIhPDynD5JFo+1phhs5tZbxQBCitWl4yNIvgnjTFbKV08kmX/AWAo2k1KBQ EcT/8HGA+vr5toOZ2kHtyw8cWwgdvaozj9EBoOv6//8tdw77k8AZ9kri9y0xbXS1aDQ== 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=1mUtNf2U; 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 52E9B606A32D; Fri, 4 Dec 2026 12:47:46 +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=1mUtNf2U Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE52C1F000CE; Fri, 4 Dec 2026 12:47:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388466; bh=GaR7pbTuiBgb5PORme6kFdr0wuGob7+9WnD5I8Qli70=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1mUtNf2UBmZW3KitAN1xxmnet7tFumvyUndY9d/IRyWVmdqDGxO/UswTWnczucKzv frUfFVSa1VvzEbkcI03BENakexfhuk9hXnrVV0FVswsSASpdZ0D38LSOJHNCGxWill fg9M/CsN+VVn8vYdkgZ+xJ048KRVy7f3jWD9vcNY= 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.1 0584/1059] iio: addac: ad74413r: fix the values of set_multiple Date: Fri, 4 Dec 2026 19:01:55 +0900 Message-ID: <20261204100659.281625191@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-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 @@ -296,7 +296,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); }