Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp655352lqt; Thu, 6 Jun 2024 14:29:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRoo40h3jHVEpGlKaw/rZFko54JKtCnEplsVJZG6jXSB10vP4dj0eBnuoZlOw/ZS+pWnFeAsUITVX4HiwMjD0i7xUrbZNtnbCBAI1Dug== X-Google-Smtp-Source: AGHT+IFHczazKcxSYvdQWGizWXhNqfhVNP9Y5wMsPtvaSiYHzzGSeZwUFAeNgD3GuZg1JCax0aYe X-Received: by 2002:a17:906:2994:b0:a52:6159:5064 with SMTP id a640c23a62f3a-a6cdaa07629mr56855166b.52.1717709359862; Thu, 06 Jun 2024 14:29:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717709359; cv=pass; d=google.com; s=arc-20160816; b=xUtTB0bPeReDvV389cZ37CkENgjBtG9imODdQLxsSQetiDW4cc/Xe48QAIkfnhTWSw tOi1LpS+cQnx3BMCdZtCibLhCwXLWWkhgHdgdFW2BmuZW7S/vGbqkaw1c/0M7wsA/Fxq Gwg1wHq1N2iO6n81/dq+AkrLxvHWjDdHDz1PwrfhEYgKO0g9Cy6RVSXIv66gZG5aaIH/ IShSnBePSglyKbUcDYXfCYL4d0bgCnEScY9X3FM0bdjWQG+tPzOsdH1iuUQjIgncZtIy SlnLiHLlTvXNTxYF9Tg0BD5QR+Lf1tU6l45dyhcQNYeddRaIS/ERds7qvBJDngURp2Yf X8gA== 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 :date:subject:cc:to:from:dkim-signature; bh=8+d36K7Pb2rbska6Wsex45QWSR6532jz+nmimETbFxU=; fh=cP4Vv7UJtG+l3CrBagbo6UfvPau+7hXqfQ3yMa3HStM=; b=RqZSgyqhQD2q129ltiyOyXe/8ROMlov0BkLbVcaJLsVxlYZOZCeQJ9bPFH1mVro0eu edgreFA4ZQgDt7RTy0QWad5M3mm9Bl93CzVC7EzDD1xEmXMF67AC8iSiEHNFauNz28eI 7/qcjJluyVneSieP08BKBLeCF/jJ1unQKZJgpbf8BGul0HGvf/FKC6OeEaha3HwHJ8dU Ic80/uYWm3xAoltqU6ZW2W9nwAP/Bzt121zZKJnnLwOQTlpndxgGvH2LchJnSfjRdgq6 CgKgzhH/N5w59x5tvxlFt0udcmy0lvUTDDX6VnEdSvLrhhdBcwNH6Jci00ewcAChtpE9 7fqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Un8alcrf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-205076-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205076-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c805cdd3esi116622466b.258.2024.06.06.14.29.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 14:29:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205076-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=@gmail.com header.s=20230601 header.b=Un8alcrf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-205076-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205076-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 5C8231F25470 for ; Thu, 6 Jun 2024 21:29:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5719419FA84; Thu, 6 Jun 2024 21:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Un8alcrf" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B283C19EEA5; Thu, 6 Jun 2024 21:24:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717709056; cv=none; b=DkbqT0g4eLwq+rnM7iKYCLw9DDQSKupBa+oXy+eKOac3WAQfonnKQGUss11wCSWBMxWYFeN9hbY5+uYIisI+eUgeMtbwcDQCCFMA3OVvDRQDM3BQ0VaSvTx/dd5oHrtCHjnCr4Vp0NnqZT57nVP9LyUNkDBKBeki04ACPMaxeIE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717709056; c=relaxed/simple; bh=zo/4rmTE9JoBy/xm1cXklprKxVVRnH90QBq8FbaD39U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RblOS0ac2xlnjpUTaOFP/BfbTR/FASZCNI+RbyfLP+y6b3ZMVZIXDbOMp/G7O8gnU2jKfXbHtRz3ZC4NWzzrMQeshl5ncktzEK441bIxpcDweRgVv8ReyVuH+yNNoK8BIx8tHbsrzbIqR2gEnGLzGWN1r5aKI6vej/0lGzyF1Zo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Un8alcrf; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a691bbb7031so195152166b.1; Thu, 06 Jun 2024 14:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717709053; x=1718313853; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8+d36K7Pb2rbska6Wsex45QWSR6532jz+nmimETbFxU=; b=Un8alcrfqdZvBlHQBmac8VnuAzbLVxOxrKxDuIoTVIbxwunZU4dSXryV+EsXcuTYtC Tuz3okfYhV9DFiBnpHTPyao09W6PwC25tsl7aobZPxUNOXCErNH+zl1vbWHkUsHbCx0H 7t2V0a0uI8xiu1TpgzO4QY6Xd8Z5zRtfQjOyc5BSTmwwR7QL1jrypRqkAP2OlgazVXbb wB14b4f5SHaloLDW4fzwVpNwM6j7/7D9jJ3buJ570NyK/zz4SmpKQgzpLtUBRDF6kpP+ BCy7L/4nU63FBMx7DKCvciVtB8mWBRfy7XSDCmR1kJSDJIQJXxAW2oMGHdS+LcxdRkbj mb4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717709053; x=1718313853; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8+d36K7Pb2rbska6Wsex45QWSR6532jz+nmimETbFxU=; b=dUkbs1m1WUfHcIYYpjWG3+cyQGNOVbCpGp2UpstOZHtLQBQpqPwAZ1slS2QSm7ubU8 8L/zby0jSmJGFNux7kDVdahZtGwP54ndFtlsu06NSUYRGkl0kOo0lYK1iVlUwPtxaU/G aOkP3LP0RQ/TW80IrpfNXQT+9V1PvI/T9vjqK3DiBSUPsxNx2yhfO+C0wTRICNzjqx25 yYl7I7PNe994mS8NxRdlpcOokMSP733Su7peBKxvw41AcYGwpnMEH9mICBAsLTQ10aP6 pTXWIJaXWlT2CfQrVvSdB2jDp3x/bAhjIHcuMiMsx4mWmVGftCUTabLZ7T7CJaKLNF5r eLVQ== X-Forwarded-Encrypted: i=1; AJvYcCXfEe5SBrDetIN9s58GuOrEcUvbSxpzeSyHogYbaHlBOEPYSpdXbexDOMMvpwZphe3HkFepZhsf3CYtlqxglbXwe0vPV+7z5EiDdpyjDVygw/bVdjCzcXDKt9o4cfYAmO26E5P+adUX X-Gm-Message-State: AOJu0Yz9C4P1ax6qV5+VlLz+ZTxZmcl2+TvzOvd7NESPptcsDGXcih8P M9gcQ1UMDDwvb0HkYrsSc+mnHMKANmEXOdihY1JatXATbdTpfwe8 X-Received: by 2002:a17:906:3b87:b0:a5c:e372:222e with SMTP id a640c23a62f3a-a6cdaa07a0cmr49452566b.60.1717709053060; Thu, 06 Jun 2024 14:24:13 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:82:7577:28a0:434b:ab8b:94ca]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c8058272bsm146690566b.18.2024.06.06.14.24.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 14:24:12 -0700 (PDT) From: Vasileios Amoiridis To: jic23@kernel.org Cc: dpfrey@gmail.com, himanshujha199640@gmail.com, lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, mike.looijmans@topic.nl, vassilisamir@gmail.com Subject: [PATCH v2 17/19] iio: chemical: bme680: Remove redundant gas configuration Date: Thu, 6 Jun 2024 23:23:11 +0200 Message-Id: <20240606212313.207550-20-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240606212313.207550-1-vassilisamir@gmail.com> References: <20240606212313.207550-1-vassilisamir@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit There is no need to explicitly configure the gas measurement registers every time a gas measurement takes place. These are initial configurations which are written in the beginning and they are not changed throughout the lifetime of the driver. If in the future, the device starts to support multiple configuration profiles with variable heater duration and heater temperature, then they could become members of the ->read_avail(). Signed-off-by: Vasileios Amoiridis --- drivers/iio/chemical/bme680_core.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c index 1cf375904b8d..76b96993120f 100644 --- a/drivers/iio/chemical/bme680_core.c +++ b/drivers/iio/chemical/bme680_core.c @@ -683,13 +683,6 @@ static int bme680_read_gas(struct bme680_data *data, u16 adc_gas_res, gas_regs_val; u8 gas_range; - /* Set heater settings */ - ret = bme680_gas_config(data); - if (ret < 0) { - dev_err(dev, "failed to set gas config\n"); - return ret; - } - /* set forced mode to trigger measurement */ ret = bme680_set_mode(data, true); if (ret < 0) -- 2.25.1