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=1796385860; b=WbSMoFH8y+EPK7uuYLZa1D6cmJyIV9tq9LNjkWzerETRZvI1BaWPcxBk3/w9TpdYwvx+ YYRUohpTYr4pK/WusJNIBK0ZuBsUgn8WmIdQM8DZKqI+9zqyuTb0gDQMbk06lDxlG2sof 2zEUK77FFD/78bwP4mDM1DRxP/wULvBpuVDwh01PBu/3MX1nQiUWarYpE2U7Yw08u8NlY vjUgqLMrYoxanVj+RdYWXL5q8RE1NRj7rnHGnG7yzow0nmSjcal+DyFlLQeHXvu5QsQ9n p0ZO7vHkgxZ0ZVuk9+0z6lxo3IrLsAa+R8UXvyPTrmd2jr/yhoUWnWCrl8rk6SSqxQw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385860; 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=EDPabCCyTHEVMbxGfQSBcSyhpySQTpgl+sOhucPX8Es=; b=oLMEQtXmKrx05wbUfqYMLqitdR5Uw6Ow/l21LE+2dYeho/ZA0dUd9qIUYBBvrSpvlX/F NaE5ZvnPO9HNnUctOXlyaoqyJTeyVELsFZ3qkgqxKIs766cvHoU85jdH/SvO3vuJmzvbt heW0lvJYaa1FhoZTHbdzRnYFtmWdUlbbEf1Up6SqksPNWf8MSjalpgvw6cXSABxRrvE+A vKxi+7nMA9XnHKp1Jw9wU/WK84ea0zSNX6Gjiq+izX+leM4JvLbEsEU4xaSFr/N8LOk3A 1nt1WM9UQfvkWGeSmDgUYJyRdKaM6y3CHgu/CUbgKzmYEgmKxWrmC+lLBdTPC4QhY9g== 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=W3MAV1vX; 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 E052F606A32C; Fri, 4 Dec 2026 12:04:19 +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=W3MAV1vX Received: by smtp.kernel.org (Postfix) with ESMTPSA id 592F81F000C2; Fri, 4 Dec 2026 12:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385859; bh=EDPabCCyTHEVMbxGfQSBcSyhpySQTpgl+sOhucPX8Es=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=W3MAV1vXKWf4OVZGrzuIKqGJgbjAIVE6OflDY251BjRFFmy4KHdDrUlS8xVz6UFlx SDuwp7VqkTSN0D0Vzw2BRtL+686d1wecr9uPGAujHMGkfzvIyhhv1KPxFiCZ/SwHO+ EdW0zzJ+RhI/NhRLJtysTK11VsmAPYeI8yfWkNuM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andrea Amer , Jonathan Cameron Subject: [PATCH 6.6 0681/1167] iio: afe: rescale: expose offset if rescaler or source has one Date: Fri, 4 Dec 2026 19:01:48 +0900 Message-ID: <20261204100719.795806119@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-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrea Amer commit c293f0db308fe76a0a9b0f6674cd2dea149b03aa upstream. A rescale channel advertises IIO_CHAN_INFO_OFFSET only when its own offset is non-zero. A child rescale therefore hides a source offset, and consumers apply raw * scale and drop it, even though rescale_read_raw() folds the source offset in. Expose the attribute when either the rescaler or the source channel provides an offset. Fixes: a29c3283653b ("iio: afe: rescale: add offset support") Signed-off-by: Andrea Amer Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/afe/iio-rescale.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/iio/afe/iio-rescale.c +++ b/drivers/iio/afe/iio-rescale.c @@ -304,7 +304,8 @@ static int rescale_configure_channel(str chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE); - if (rescale->offset) + if (rescale->offset || + iio_channel_has_info(schan, IIO_CHAN_INFO_OFFSET)) chan->info_mask_separate |= BIT(IIO_CHAN_INFO_OFFSET); /*