Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp617301iog; Mon, 13 Jun 2022 09:14:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlEji3qxMmf5ZnsytFr/Eestx+FhR/9wb/3VIKehuCrBndGHiOWqxzX1czn0NbI6SKflOh X-Received: by 2002:a63:1846:0:b0:3fd:dd12:ffa8 with SMTP id 6-20020a631846000000b003fddd12ffa8mr295691pgy.337.1655136852574; Mon, 13 Jun 2022 09:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655136852; cv=none; d=google.com; s=arc-20160816; b=fUiJ+Sm8SaOOtrCbU8McI+OTSVFOa09SjeZudjol0QR3PLq0km5E8FM6FBiH61Ohgk SKIw2TbzTmbzQlSbC5fdd3aabR1u0nnekrrsAltJyb030Q8jIuQI/9c3a7j5hOJlai5g fFJ71DK6+GUQlRy/46A8TRaWAzaPxxqg0Z04V6pRysMj90pjpSEk2LBK1CXXkzKLF0PE lVPNLHkS/5DsDXp/igA24CLBItTURBtbAfyXeDuBSF15kB96NP/HM498yoYuljsAZAfE VSTaMyVgcWqoNIPvT69PDUvHKcDR6E329SpHfVZsO7cjVYNWFcOsPaWxkXONzRirbfnn 9uSQ== 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=rMK3ia9jaXK8u9g6C5eMkDygo8BPoKbjcMeED/EmxRU=; b=VibfPPVMpmKNz+W4qEzw/uff2Cc+qrz0K3qUUGXpMNZXKvYyVaDOvlK9+6uNQ8K0x/ NDii9gv9Sw2zDsg1mRQA3okPoxvGwS3te8YzG2M1wcWdTyTAvfxJ8tUdf+0rpce35cCe fXVmQKV46tx6GVe3r/EvUpPG1A9NbdYOvjVxakU9j6QtUPJ21a0ob4Eo7RWlv1qAlWuh mpyPEjunulmy8KAIYvDt/5q2fBKFZlGOvk5EFlVMuds8RIOa7diP+jbzY0d4NoeoadmU o21vVTUryNYEmLYm+1S/YJEsc9MJdBvHaQrcN20u/gFJmYle6HWBxp//b7LqFT5MtTWZ O6xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XVSsLWEf; 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 i21-20020a63cd15000000b003c233469c0asi9674700pgg.745.2022.06.13.09.13.59; Mon, 13 Jun 2022 09:14:12 -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=XVSsLWEf; 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 S1354910AbiFMLgZ (ORCPT + 99 others); Mon, 13 Jun 2022 07:36:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354528AbiFML3k (ORCPT ); Mon, 13 Jun 2022 07:29:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A048201BA; Mon, 13 Jun 2022 03:44:59 -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 39583B80E59; Mon, 13 Jun 2022 10:44:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DEF5C341C5; Mon, 13 Jun 2022 10:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117097; bh=aRdbOx7lSLv9D6cWiWuBrvvuoubprMwBW9czfB/JjMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XVSsLWEfebVn7cEbPbVH2lPXlK0jqV/+v6n/WNtWhGPdxfRrleTCfsOJaq4Ha7qOY kjXxMr/02MgfMjUwwoLV4o//qXsSz2X4kcoclloN2SIqYKKIfVP9orfx6RbnKGTPzD gsB1y9yUv9kBwW2P1Hyn3caLzFSbNL4BxJDW1cNA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cixi Geng , Baolin Wang , Jonathan Cameron , Sasha Levin Subject: [PATCH 5.4 297/411] iio: adc: sc27xx: fix read big scale voltage not right Date: Mon, 13 Jun 2022 12:09:30 +0200 Message-Id: <20220613094937.664275438@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@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=-8.3 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=ham 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: Cixi Geng [ Upstream commit ad930a75613282400179361e220e58b87386b8c7 ] Fix wrong configuration value of SC27XX_ADC_SCALE_MASK and SC27XX_ADC_SCALE_SHIFT by spec documetation. Fixes: 5df362a6cf49c (iio: adc: Add Spreadtrum SC27XX PMICs ADC support) Signed-off-by: Cixi Geng Reviewed-by: Baolin Wang Link: https://lore.kernel.org/r/20220419142458.884933-3-gengcixi@gmail.com Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/iio/adc/sc27xx_adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/sc27xx_adc.c b/drivers/iio/adc/sc27xx_adc.c index a6c046575ec3..dcc01cdcff3f 100644 --- a/drivers/iio/adc/sc27xx_adc.c +++ b/drivers/iio/adc/sc27xx_adc.c @@ -36,8 +36,8 @@ /* Bits and mask definition for SC27XX_ADC_CH_CFG register */ #define SC27XX_ADC_CHN_ID_MASK GENMASK(4, 0) -#define SC27XX_ADC_SCALE_MASK GENMASK(10, 8) -#define SC27XX_ADC_SCALE_SHIFT 8 +#define SC27XX_ADC_SCALE_MASK GENMASK(10, 9) +#define SC27XX_ADC_SCALE_SHIFT 9 /* Bits definitions for SC27XX_ADC_INT_EN registers */ #define SC27XX_ADC_IRQ_EN BIT(0) -- 2.35.1