Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6287586iob; Tue, 10 May 2022 14:59:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDa2qLRvTfW3jM7NKW3P/9iSQ5zSppK4jxhrOG3CDgcEbu0xWTaqnzlNWY5uy82qtz9Lkq X-Received: by 2002:a17:90a:e510:b0:1d8:39b3:280b with SMTP id t16-20020a17090ae51000b001d839b3280bmr1957227pjy.142.1652219987826; Tue, 10 May 2022 14:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652219987; cv=none; d=google.com; s=arc-20160816; b=MC5gKnS0bG/nWXBz5tgm6oCojniFA7/O3+/QfFGeOxln/muqreuh36Di9HD9yp1LAi bBq/rxD+Uw1G/GZ1WGttbLnPa5jBxvYMtJkjq7udiDF5lg76LvF44huBJ0SkpWZJtQVY jVOKRaJOVerNr6Yg4Lsr9WIGA40Wad/hPNRpm3Qrsv3U2G/Y4uSHWvyaOP94kBAjXH9q +AC/uUF/B/LN5vZFvWjGwt/oboB6Md5BGzo4EONdQdF3hp0WX512yba1AKfrLYmN0BWV VyvlXK9Zi4f1R4eYIz9B7HybspRSYUpM2NARRGEQ4eBPNwK0C5Um2nvYctuRCIWaSG8o lY5w== 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=h9MJU8R8oyMMCQpj87o8h6kCKrk7m+ebkjphZKAt8YM=; b=cnu+VdNjE4DRu5nP54sReiaA/bPwCurT//DG0U4j6PtI9YhZBAH10AepQD3zmYTkx6 lfGDs82yb+hhsWTfVRSkSSyps4kFdzzk7FL48PpnMyehTMbFuogqcMHKXckcf3UIAWxC JwAKpJ1HHnvwSqcWJ7Bm15DoeXDddxSZuqXpG2H7dlMJkAc/cNsQgU5V4lpco6fIsBCb N7DQxyrFWiN8rvy9oi2P3LBBFiAjB8+1+JfDCh+KBIu1xmziPmxlrRyRluEVcoLVb6oD h4VH7tsfCT5cROBubEeTl7YR1o+REUN9QiOuEampcaHvr+AmyNwTDPZ89e6sx07QZeXF GSUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fLBXaf09; 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 q4-20020a170902bd8400b0015ed25c4e18si186325pls.463.2022.05.10.14.59.32; Tue, 10 May 2022 14:59:47 -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=fLBXaf09; 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 S243523AbiEJNbQ (ORCPT + 99 others); Tue, 10 May 2022 09:31:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242998AbiEJNVQ (ORCPT ); Tue, 10 May 2022 09:21:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C45704A3F5; Tue, 10 May 2022 06:14:24 -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 13176B81DA4; Tue, 10 May 2022 13:14:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A85FC385A6; Tue, 10 May 2022 13:14:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652188461; bh=LlaNvZNC6zMQ2YYn7Jimy2RhtIUwN/GT9NAOZ5adIg8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fLBXaf098KUuKqUdlAg3sj4m1Q5Oe2nWSHanxnVSOPc98UxW1ELg86PSj0eLW2HR3 R0sK18Dsc/A3k3HheaQOsavBPxjsjPQYCtHN+UNiGUpWGcNgZzhG/JSSTrfbzXR0ys GSIIR30i+1fF8phHjkf7xzGHZi3zY9JluqUqjW8A= 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 4.14 16/78] iio: dac: ad5446: Fix read_raw not returning set value Date: Tue, 10 May 2022 15:07:02 +0200 Message-Id: <20220510130733.013232254@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.522479698@linuxfoundation.org> References: <20220510130732.522479698@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,URIBL_BLOCKED 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 @@ -171,7 +171,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;