Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp819943rbd; Fri, 23 Feb 2024 04:47:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX0kUlOAUheFVHxktrYNKj0CYCesnKfLGjQJM1BHxpoXgqcfqnPWZUsFNNvym7J58uqgAnWdt8XsEGQLFAgWRGeUyaXBmGUM5q4fZQM4Q== X-Google-Smtp-Source: AGHT+IFmRy2jrmvkOfFNqnv+jqCJc9I1cbBwqVRocHShw7nYy7b6laU41CQCKdtwSICPgpP897MV X-Received: by 2002:ac2:52a9:0:b0:512:bf09:624a with SMTP id r9-20020ac252a9000000b00512bf09624amr1179974lfm.66.1708692429422; Fri, 23 Feb 2024 04:47:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708692429; cv=pass; d=google.com; s=arc-20160816; b=G23qkWlfHYbBlh5SqZdT0yEM9raTw2ilRpD0sX3VQWIrFTRSHEyuuL+f4KD4M30WDq 1vvA7wJffGZojzC10lBheRc34yPDruOOghoXAKEpOBL/7baiiy/tC66MaMgLsZ+VOCso 00chAD9e4kibszIzOAo7LqlGCwboOKEMFPGyK9twK8RxHJKgfnbHEFo4d/OTuL5oNZ83 JQvyGW+c7hKtaYgVgHgazjofp46CmLUDRrxFOiyNP8ECUBn+I0QY9iIoFVjFyOnyG6Tw saezrrFqHd6TNYeGNEldWFVzCgJdT6dlDri9Q2XrqnhO4FUrRN3CSEA2cRSp/xKtnNGu FVAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from; bh=hVPGwzrf4l7G4dYf8bLHWHZUm4bLf5NyT+s4EhMj80o=; fh=4Ejxir7Asd0PGBlxwH+sBJkQn6ICEtx02wHM8aXm5mM=; b=QIrQNiogByHVql0w+0bvYJ+clHJTGPRmeJwi+6JmfyHSeysySEGo1xrHbcKQjfak55 9lUbqWE1qZyWsKSeb4PGRPgbrs1gY8OMVxZ+gE/8sfB0iQSBcpyT+s0PV6vHLynUDAuY PrwJ7qf+M85CSYa2QIKGTKxcvzSxq9mK4DdPMLg8wkyQ2U7fjbmLmXoZJQUv/IxH01i/ tfapG/spKuliob+2LCipA8Meo+RgaO7oglH7zzJfV/Z+e/bPpL+Yi1PoG4jLn7PMVNcs l7jOgC7Fl5TipulnjxK47nYV8WgNwouXmF9/Tfqh1MtkdOVsf6ugNDTz/dzMqNvb+r1U AF6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=0leil.net); spf=pass (google.com: domain of linux-kernel+bounces-78319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78319-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c11-20020a05640227cb00b00564d52c8ce3si3079792ede.508.2024.02.23.04.47.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 04:47:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=0leil.net); spf=pass (google.com: domain of linux-kernel+bounces-78319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78319-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 28DA31F25434 for ; Fri, 23 Feb 2024 12:46:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DB1B7EEEB; Fri, 23 Feb 2024 12:46:13 +0000 (UTC) Received: from smtp-bc0e.mail.infomaniak.ch (smtp-bc0e.mail.infomaniak.ch [45.157.188.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE34D73F0A for ; Fri, 23 Feb 2024 12:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708692373; cv=none; b=Vr7zbccQ3V0z4yvUPUMadTEOy6ubhiMSrANB1XNWmLcN00Uqfz+Jkp0AbSjQ37SxRCtlk0oDuVZfCmCeRvF0ioMsrSIDxK3edtKzKh3bhhzgHsxKr6FX/S7PNw67lQGnzG/MjZdamY2tvP0JsDUlNa7GQB5MNKZj4CgItHeXpb4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708692373; c=relaxed/simple; bh=oZmKnh899g7Ve8UaEWRKSGcDpbmmpXhJYkdPoVN2API=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mbcL5wScLR+IblVew64HZlZm7qUmjus8g690XLqbkneeVmo+IdxQ+feYS1LKZNo4XhYeo6yWrHvRVbY39UP3Q0ttxw4+FzrfmMXEIiG6lj6TIdc7HKS87JqTrSDIvQuFqxwB6szolWm9m4TtLSc5fDPDlVIM9FBnxXmfP9trejM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net; spf=pass smtp.mailfrom=0leil.net; arc=none smtp.client-ip=45.157.188.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0leil.net Received: from smtp-4-0000.mail.infomaniak.ch (unknown [10.7.10.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4Th8rT5Sg8zMrtd6; Fri, 23 Feb 2024 13:46:01 +0100 (CET) Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4Th8rS6knNzwNb; Fri, 23 Feb 2024 13:46:00 +0100 (CET) From: Quentin Schulz Date: Fri, 23 Feb 2024 13:45:21 +0100 Subject: [PATCH 1/3] iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240223-saradcv2-chan-mask-v1-1-84b06a0f623a@theobroma-systems.com> References: <20240223-saradcv2-chan-mask-v1-0-84b06a0f623a@theobroma-systems.com> In-Reply-To: <20240223-saradcv2-chan-mask-v1-0-84b06a0f623a@theobroma-systems.com> To: Jonathan Cameron , Lars-Peter Clausen , Heiko Stuebner , AngeloGioacchino Del Regno , Andy Shevchenko , Shreeya Patel , Simon Xue , Philipp Zabel Cc: Jonathan Cameron , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Quentin Schulz , Quentin Schulz X-Mailer: b4 0.13.0 X-Infomaniak-Routing: alpha From: Quentin Schulz The SARADCv2 on RK3588 (the only SoC currently supported that has an SARADCv2) selects the channel through the channel_sel bitfield which is the 4 lowest bits, therefore the mask should be GENMASK(3, 0) and not GENMASK(15, 0). Fixes: 757953f8ec69 ("iio: adc: rockchip_saradc: Add support for RK3588") Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- drivers/iio/adc/rockchip_saradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c index dd94667a623b..2da8d6f3241a 100644 --- a/drivers/iio/adc/rockchip_saradc.c +++ b/drivers/iio/adc/rockchip_saradc.c @@ -52,7 +52,7 @@ #define SARADC2_START BIT(4) #define SARADC2_SINGLE_MODE BIT(5) -#define SARADC2_CONV_CHANNELS GENMASK(15, 0) +#define SARADC2_CONV_CHANNELS GENMASK(3, 0) struct rockchip_saradc; -- 2.43.2