Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1977210lqo; Sun, 19 May 2024 07:28:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+xMjrrP/KMT+Mm8hGgEA5HqucJDwBfn9XmEp7C/MsPzuxxxDYRm73Wlb+i/w9zE4yMP6kBfjtnHNU8idMmeFWpJdXumJ+1Tn8T3y2Cw== X-Google-Smtp-Source: AGHT+IEdI9xzkmmj2VY34Ln5+Y9QG0n8kwS1+pEH27mSZwls05VAypOzZR5ybW+IPlvmagzThXdX X-Received: by 2002:a50:ccc1:0:b0:56c:1696:58a8 with SMTP id 4fb4d7f45d1cf-5734d44fe63mr25727789a12.0.1716128915765; Sun, 19 May 2024 07:28:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716128915; cv=pass; d=google.com; s=arc-20160816; b=k/4cDluuXI3nDujtIq9h9rIP4R2i6DRkliPnGP0YsZUCPWkT8FWQHzdR5Y/NLLJJPf G0OPHoXfdsL0qvul/z4klNCcp/sLITUHwVhzsFSHdcph+BC2wSwsp7N84QL2g4AX1/h6 ZXCwBvJj4ww5uouz/+m/6qJdJpD24hI6rYas24ULuYwgYW1K3I87eIZasm0rzOkwlSh/ k2LwzRrNBkPPwV8mEzn5zVtHU+S3WciCc0e4A07cuasRZr+kanmnjtGapVrNgdH90Vi9 2okxqXkduXOgzD+Nug+q2oGUFXTDPVyv14bRDMzkUThIXlqBMBWz/mtTSLloungRKJ2q Tgbg== ARC-Message-Signature: i=2; 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=QztcnG6yezd86A1ZqjiVMQO7RZqgWQTgRiO0oNAzz6I=; fh=ULxNTxaaQIEX8Y9ih2rqqI9Lxn2bbvdaV8tkS1+QGD8=; b=GBB7N2PPH/3DyNIYE0D70qYvYl6Zknp2k9dnqYr2NlrOE8Ro6+ItEmMU8faVwynfIh SL/vTZ5xEEeJE7Y7rXcqwILt10zXj8zCCqZSN5wTcFscS+AAwDQRw0gwbg60yYWzHtcq 0eYQ7r+f/Paz/d8Jb2ET1LIyhjqx7MGJ5EnW7/T1En7GH8rial0lZ5wLnXINgtLJa2HC 8t3k3L06NNuCJU+ayxcRl22EJ+YhgW68eFOAXnG41WK19xUrwL6w3k+WbXOlqPg759Fn EkKF2b/CRefH/h00ophkpp3DsicmPzaYH3TzYcGGOa7R2ivUnyOP8XczCGS7hf08eMDM b1XQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U1z9MtTT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183128-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183128-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 4fb4d7f45d1cf-5733c36e35bsi12286936a12.554.2024.05.19.07.28.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 07:28:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183128-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=U1z9MtTT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183128-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183128-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 7DBB41F21925 for ; Sun, 19 May 2024 14:28:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60EB74C62B; Sun, 19 May 2024 14:28:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U1z9MtTT" 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 850D23D96D; Sun, 19 May 2024 14:28:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716128908; cv=none; b=peiBhk/av2a2j4LLP7iMMkdJ9ZZTivDCXJODXpOOwUUpswHCQ9PMSRaqATyxuKnoZ9BUt5OTkGpAUUqmMX128QZU9NltBF1yRaNBQOXy+iiLMDDhWRCiJyEI3tzHQc3uHc8CFFL4t6KIXkoLTeAkwYnWUpTIZjWUocBvFC7XVcs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716128908; c=relaxed/simple; bh=cBSTNNqNP01K4/ip+KCoAdCRfvtVbABGRgJ90i9SwIQ=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XxvFytA2du0ZtXtkHdR9Ny6DyRQxuxIMRnA1/LKOcTOXiMUpq/QW6Pk7aR8RQUcex59O8FoLKADPsFRtCIWf6gO7EmlMb0gyEIjUGlpHzrqleS7IRiJ+vabDuUS4bSDLkDNNnjFDO0LHrXsBP+stS+fcTSQHHTxlv4hOK07fjpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U1z9MtTT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E387C32781; Sun, 19 May 2024 14:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716128908; bh=cBSTNNqNP01K4/ip+KCoAdCRfvtVbABGRgJ90i9SwIQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=U1z9MtTTxGwXZSkTG08z+EbXzQA57bv+iMV7Xshpaq4jQF9UQN955eC1lOQ7OKDMZ 5XIPeneTwlSKehmmXyin9QeJwcbnxYn5C+NfdtSZ6OibVP/34PEbkoduhfEiiGbw1e oaEpFhk6WxECxaKbNt3fTL5CGiWoO2cFsZ/VKCJb4sKvfBKnkruGWIE3RlEtU1z2Lf wn9fWYkbhrhJAyWtF+JqCQ8ra/Pi497O9LfDgPwVVWaHp/dc6w+UZ3XmBV2k5eoIw3 AhUKcHXNcw7L8XKFJcbE/rTAAFunopfHdj06AQpwy0fEo0yUrrmol61RJ+95mIxIZi 23jdF4mnzSgsg== Date: Sun, 19 May 2024 15:28:13 +0100 From: Jonathan Cameron To: Vasileios Amoiridis Cc: lars@metafoo.de, andriy.shevchenko@linux.intel.com, ang.iglesiasg@gmail.com, mazziesaccount@gmail.com, ak@it-klinger.de, petre.rodan@subdimension.ro, phil@raspberrypi.com, 579lpy@gmail.com, linus.walleij@linaro.org, semen.protsenko@linaro.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 3/5] iio: pressure: bmp280: Generalize read_{temp,press,humid}() functions Message-ID: <20240519152813.30605aed@jic23-huawei> In-Reply-To: <20240512230524.53990-4-vassilisamir@gmail.com> References: <20240512230524.53990-1-vassilisamir@gmail.com> <20240512230524.53990-4-vassilisamir@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.42; 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 Mon, 13 May 2024 01:05:22 +0200 Vasileios Amoiridis wrote: > Add the coefficients for the IIO standard units and the IIO value > inside the chip_info structure. > > Move the calculations for the IIO unit compatibility from inside the > read_{temp,press,humid}() functions and move them to the general > read_raw() function. > > In this way, all the data for the calculation of the value are > located in the chip_info structure of the respective sensor. > > Signed-off-by: Vasileios Amoiridis This had the earlier missing int ret; in it, so needs some manual tweaking. Applied. Thanks, Jonathan