Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3108361pxm; Mon, 28 Feb 2022 12:10:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvqm6NNzzzc7drNGXWEmhsaEJJI86mrhGA8iOclO0Idwob9u+j0vBWWTO9a77o9dIOg50q X-Received: by 2002:a63:1003:0:b0:378:7d70:2ec5 with SMTP id f3-20020a631003000000b003787d702ec5mr8727624pgl.351.1646079045148; Mon, 28 Feb 2022 12:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646079045; cv=none; d=google.com; s=arc-20160816; b=k1sx3XW4aFHGLjQgTbUctVbCeqlSiYxpp6A1s4AaineS0UhVVQXERpoTb8HMAOpMGT xTrLQHK4MdVKhxBjhi4a0zHqVmA1V0OGtg/nSX+z0I7/LWgao0RpzyRu4ykhL2jsQ9Xq 8wFsTOXcw5HYHrpQx+849koOJRYgcGDsczIzJouxGfDqHwv8oOkNoHwERnCe0ECucrgg iEywjfNhWtMlGtXs2CNdf2Q+GsVUsMmJbYqf2HbSHhIvKU465rI77A+ZusW7UuXfGxHW LYVkynkuYy/+7nL9t/bmmsoyNQCrmPdAsxxtAiq1QDOFhzPgG0BpBHwuRNrkZdAe1tH6 8Pgg== 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=+knyIiBaalDOU2G3FfTmXiOSvnezUtYEJUDiKjYvj04=; b=wE5//tVLqzv0za9R35wu/bY0Ug82MfrVjcVOPlGEg+QaZFn3p/LxcaOKjWk6T+Fpk3 uLAbPT4ERscKqUrJxlCp04PIYWVRH0yxleIvzCftrqLWSqsepWg7VV3KQCTCmSGEa59f ALEhfGrMh5wdvbeC87jq7j67OVO2tiuMdgczLrqxaTYLPEUu8y9pUHhTgCGlJ2HoRCY0 PnkhgOjwvQ8HeZegHwRwDR60Ex1xm0WxrdFv+UQv0n0oLNcUIe2iEqzXXxWLlP7IiciP B+SWHf/fWBFKgYXGj8R5deQ2HGGwKNBjIR+QzUGhUKbsIOaWseYs5bq+L4ThxViJQnZK KPJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NT5F/PPm"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bf17-20020a656d11000000b00372f2b97fb4si10639705pgb.693.2022.02.28.12.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:10:45 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NT5F/PPm"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D5BDA14CDA8; Mon, 28 Feb 2022 11:34:35 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236898AbiB1SLH (ORCPT + 99 others); Mon, 28 Feb 2022 13:11:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240905AbiB1SEW (ORCPT ); Mon, 28 Feb 2022 13:04:22 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 495EC35259; Mon, 28 Feb 2022 09:47:52 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 9D9FA60915; Mon, 28 Feb 2022 17:47:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9609C340E7; Mon, 28 Feb 2022 17:47:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646070459; bh=0fw9T+tZAvMBuO779pLSBg40CJqtPfcQQrG7q6rLaZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NT5F/PPmnY8sRUyHBWdqxReOQmuRg0RFw6FHypkF9e3f0kXp8Rwu1BMMQkLEs2xHE IuKMhI8pH/Q4vtOHDCdRfRwM92OkpcLtnpX4Mo4Q0pCJ9dY9SS3Ho6wIjjvcRKvlJO Le2APQga4zupR0AorM1WFsoEcdeAnDHrRcQX0lGc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cosmin Tanislav , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.16 117/164] iio: adc: ad7124: fix mask used for setting AIN_BUFP & AIN_BUFM bits Date: Mon, 28 Feb 2022 18:24:39 +0100 Message-Id: <20220228172410.953885784@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172359.567256961@linuxfoundation.org> References: <20220228172359.567256961@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=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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: Cosmin Tanislav commit 0e33d15f1dce9e3a80a970ea7f0b27837168aeca upstream. According to page 90 of the datasheet [1], AIN_BUFP is bit 6 and AIN_BUFM is bit 5 of the CONFIG_0 -> CONFIG_7 registers. Fix the mask used for setting these bits. [1]: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7124-8.pdf Fixes: 0eaecea6e487 ("iio: adc: ad7124: Add buffered input support") Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20220112200036.694490-1-cosmin.tanislav@analog.com Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/ad7124.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/adc/ad7124.c +++ b/drivers/iio/adc/ad7124.c @@ -76,7 +76,7 @@ #define AD7124_CONFIG_REF_SEL(x) FIELD_PREP(AD7124_CONFIG_REF_SEL_MSK, x) #define AD7124_CONFIG_PGA_MSK GENMASK(2, 0) #define AD7124_CONFIG_PGA(x) FIELD_PREP(AD7124_CONFIG_PGA_MSK, x) -#define AD7124_CONFIG_IN_BUFF_MSK GENMASK(7, 6) +#define AD7124_CONFIG_IN_BUFF_MSK GENMASK(6, 5) #define AD7124_CONFIG_IN_BUFF(x) FIELD_PREP(AD7124_CONFIG_IN_BUFF_MSK, x) /* AD7124_FILTER_X */