Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1206385rdb; Sun, 7 Jan 2024 08:15:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOEtd/QVnLR14cJdJI/vMUyBE/GRFcNyQXYXCzH+dBuiOkl3W4lPXsDPOPQncm7JhI5/C6 X-Received: by 2002:ac2:5288:0:b0:50e:7c70:fbe8 with SMTP id q8-20020ac25288000000b0050e7c70fbe8mr496316lfm.186.1704644150140; Sun, 07 Jan 2024 08:15:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704644150; cv=none; d=google.com; s=arc-20160816; b=cCvD7Xkkzg3pShhFxS+IYTizbrjMWOV3UfE+nnZ5aDZ+bHGLtizIrzwvBmLaFHfwCk OTdNObjXNFtGK7d42YAe+qe3sFftbI47C0WN4+NJ7yDQSpsAox1BkQpKUs+iGzOd7Efp CtqWzrcldGLdADZ8DqUtamID/M3mTDxWfYtGNsJcyBV76cKwPcLio6TgSHXnmUIMEAZ6 qlxu4fQ0IJPSccVYsGadawqCaVhpvfv9r4cnYc1A7W1h+FHDjeHT1NfS8xG5G9ry3Y0G PzIBY09RpdBfjwHqzEqhl48ryJ5EUGGT5SpEd42MDpR+QUWAvc3aq3A3Rf+OO2Wv2kXO eSuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=B6qPGD/ErhZ6NOXY0xzEVg86ecGq/82keAjgjrT/d74=; fh=Jhwp54ORw8kML/rPdmvAzsjBiJQ5fcx0Pjd01YUfhgo=; b=D3FYmtBKw9GB27PvPq6PtkGZpdlomRQR1ByrwWJB3AF+vt2UNa8k2zg3Zc7Gkokgtk B7xPoEkOg0YNuEu45Vy/vIjzYdPnOKl0OPanMEAu1vOXeW/awz3/JJtWp7yMRSYq48YK WujqJA42JkGjgT5k58TwUO5XwF4CZDlkjhafs+lnQjQ0J18u8jY6xPxcH/v1qBJT+9zE WUgQfG32v+t/KPrNhh21DSxmt+vypt+bh/nZ3sheISMw0cLCsUKoBYS7g1//qdWH8Aj1 cIv0YXLk/02Nhetd/1Oq68HSdrD/rbw+xPPGBY38GWyUb9gvSn6HsTFIhiMCnO+2+kGk QmEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oSyoz73S; spf=pass (google.com: domain of linux-kernel+bounces-18910-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18910-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 y15-20020a056402270f00b00553ffeb0bd4si2402198edd.503.2024.01.07.08.15.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 08:15:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18910-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oSyoz73S; spf=pass (google.com: domain of linux-kernel+bounces-18910-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18910-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 D95A31F22E22 for ; Sun, 7 Jan 2024 16:15:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8059113AE4; Sun, 7 Jan 2024 16:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oSyoz73S" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AF5B013AD7; Sun, 7 Jan 2024 16:15:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45396C433C8; Sun, 7 Jan 2024 16:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704644132; bh=Wf6eDvpDPRtyWdVAPf7HspHXkbuiVLW+r7ivHe1tA6M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oSyoz73S+7PGDNDs7wkI1Y65vcK1rqqXt9g3YjMfz6VIJQOu7gyfy7Zynkf6I/hE1 BmrYRRtr+eRKGS22FUaWaWq8FTH2F6ybUDCZielg5Z7hLZpQWBQbAntKTRpwrQUs6n zjo3oHVwwrgsN7vgykCXQTqEjNmAVvj+pIvNrmizGuZM7AcoEiabybv2P0TOHsmXfN qTyOKXbF53YXhJP645pHFIQHhIumTVRCQ/iqkbCN11OU/rdvGEGRBxPv4vmWGB19lR jYrEj4dK57fIe4F5bsybSur5Qw4mMWmCU8R5xgKE4oYp2/3Fd5NQ2sQs+e6gVsGW0t d1PUhQ6sp7mUw== Date: Sun, 7 Jan 2024 16:15:24 +0000 From: Jonathan Cameron To: Mohammed Billoo Cc: Lars-Peter Clausen , Marek Vasut , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Biju Das , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: ti-ads1015: Use correct pga upper bound Message-ID: <20240107161524.7dc72a3f@jic23-huawei> In-Reply-To: <20240106174836.1086714-1-mab.kernel@gmail.com> References: <20240106174836.1086714-1-mab.kernel@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 6 Jan 2024 12:48:35 -0500 Mohammed Billoo wrote: > The devicetree binding and datasheets (for both the ADS1015 and > ADS1115) show that the PGA index should have a maximum value of 5, > and not 6. > > Signed-off-by: Mohammed Billoo Hi Mohammed, Seems correct, but I'm curious - did you see an actual problem with setting the value to 6? From my reading of the ads1115 datasheet 6 and 7 should be functionally identical to 5. Anyhow, good to clean it up anyway so applied to the togreg branch of iio.git but that tree will be rebased on rc1 once available so for now I'll just push it as testing for 0-day to get started on testing it. Thanks, Jonathan > --- > drivers/iio/adc/ti-ads1015.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c > index 6799ea49dbc7..6ae967e4d8fa 100644 > --- a/drivers/iio/adc/ti-ads1015.c > +++ b/drivers/iio/adc/ti-ads1015.c > @@ -925,7 +925,7 @@ static int ads1015_client_get_channels_config(struct i2c_client *client) > > if (!fwnode_property_read_u32(node, "ti,gain", &pval)) { > pga = pval; > - if (pga > 6) { > + if (pga > 5) { > dev_err(dev, "invalid gain on %pfw\n", node); > fwnode_handle_put(node); > return -EINVAL;