Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1298174iob; Wed, 4 May 2022 20:20:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwM+q1mANvq4adZMAIfdVgvoxOsJcH2iXT8J/UmWwm8/pyeW+p5zOs03UQB+ea2qOy49w/k X-Received: by 2002:a17:902:f2ca:b0:15d:180d:704 with SMTP id h10-20020a170902f2ca00b0015d180d0704mr24658685plc.102.1651720856426; Wed, 04 May 2022 20:20:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651720856; cv=none; d=google.com; s=arc-20160816; b=1BXaCaqVPerCjq2BidJSvMCePl1TJkLZpjDgLoFurT6eCYX0F/nez0+asAhKbVWary 47abpD9EGwWuTSDjyMB2hvTwI7vI6T9myl08xIsvjFI4IKmAua20InQOR6LWZD0039xM AL9UNPAoY0dxbZSVesp0z6SrNKDOPUNvjxixdXAVuvlPoLFOxiDdt9Ihph7hehOvIlfp ROvXL5wykZky6AEJuUZIvbW3RYxzdKEkGDWT6KW6XlmujwFiNapMF88Lxj2vqpFmbyyQ Pdbxd8Bez1KHqPDepjjgD/BgCnuCfdkcBGFtw8O95ZOsnekfMDEzinnJC2Amblx409bh PjEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+ib8l0pJlK97zSGkdULnqrmwTO4eOweupiGtHE/wGE4=; b=PxEp0UhDyGac7i9D7qqTjKZ03gpzV2hSS4jkQVVQOHX7FNVSKoNQw8OnWAEqEzIOLl BZ27dXB4qGrtDnlqoxViYGQ2VwbkDBDxp/26Sn9r8WsKdtMECojaLoAbhDfeHWami+ik AJl3b2TUU5noCJvUls40qtmZ8+d2jYFhu5TWNXAERJhVjDgwoEZ27ICVO3vH986KYINP V7qT1eJY49qS5wVnlS0o0w6vriAsgXtQrd/vYAz4aisjtyE4r6PsJDkMFNXo8UtHCEwz yhFL3lpAVG+fkLm4LyENB7FU0rl8LaFl7oH3Ebr38fL54oEkWtMWh0buTW+qv3Nfx2H0 4P/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ba4OfiWI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a655942000000b003aa7472c763si314596pgu.416.2022.05.04.20.20.35; Wed, 04 May 2022 20:20:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ba4OfiWI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357151AbiEDROu (ORCPT + 99 others); Wed, 4 May 2022 13:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355224AbiEDREN (ORCPT ); Wed, 4 May 2022 13:04:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D3DC4EA07; Wed, 4 May 2022 09:52:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BC50EB827A0; Wed, 4 May 2022 16:52:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C94FC385AA; Wed, 4 May 2022 16:52:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683161; bh=/ORMeW9VdrfrZbrInu4dInEhj+vzKcGEl2Q1Sgw3Yvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ba4OfiWIEfTkeB9PRWuf1F5TU39IWAtgeTh7yDpIumnADphYvLZCNAty2zGvrqkJQ a31IChtwIeHSgy7vMfyq/icUorEIAYO4bnqbVY4wbV/d1Zg4i+kJZpNa/a34Bk3Oxh drKcJWDgu3wqJvRwf5E83mgVlhertpsjI4H4Vlg0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Hennerich , =?UTF-8?q?Nuno=20S=C3=A1?= , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.15 013/177] iio: dac: ad5446: Fix read_raw not returning set value Date: Wed, 4 May 2022 18:43:26 +0200 Message-Id: <20220504153054.676623001@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Hennerich commit 89a01cd688d3c0ac983ef0b0e5f40018ab768317 upstream. read_raw should return the un-scaled value. Fixes: 5e06bdfb46e8b ("staging:iio:dac:ad5446: Return cached value for 'raw' attribute") Signed-off-by: Michael Hennerich Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20220406105620.1171340-1-michael.hennerich@analog.com Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/dac/ad5446.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/dac/ad5446.c +++ b/drivers/iio/dac/ad5446.c @@ -178,7 +178,7 @@ static int ad5446_read_raw(struct iio_de switch (m) { case IIO_CHAN_INFO_RAW: - *val = st->cached_val; + *val = st->cached_val >> chan->scan_type.shift; return IIO_VAL_INT; case IIO_CHAN_INFO_SCALE: *val = st->vref_mv;