Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2218785lqb; Mon, 27 May 2024 11:41:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXeHKt+URmxB33kRJtq1Dgjz9jJ+7E71NcwvJEnHlydk/HeTZc+siJOYGy8iYQ5LBp8d8orTjAz2gWpa+MtNBQox05itpuSXHLJQzGeMw== X-Google-Smtp-Source: AGHT+IGha/P2Se87UVyf9EzaNA6I/j2ywC5GJ6zAw6A3/8pxNS0pmsFn50RXK9nra/yxJXwvFbSe X-Received: by 2002:a17:902:ec8d:b0:1f3:4f58:2037 with SMTP id d9443c01a7336-1f34f58236dmr166379625ad.18.1716835283095; Mon, 27 May 2024 11:41:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716835283; cv=pass; d=google.com; s=arc-20160816; b=lU+15JWN+KAd1DaMyxrunB5DNLNilr8dGdqpN5WF59gE6+qCNb+4w19chmaZqCHPXq Hq/jyVysyvbtFc3mDobBW6j570Mjc20ECsjuiqppefbO9IiOFryMyzZcECbvND0t64GS 961FX5YBEICvJuPXS95fVjASS5AFH2b9Pwnv3Z67l7YBMY9NYpBZ/+FBYbnVacPCfNK+ /z47fiuamIjwYdV8j/PCg9TNeycctcV+5AhzODdaAhruCTm8P10G11r/a2nmUQY8nuFT 0ZL+cQHUppq7EKgPb8oI03ePr3dEcsggBo1EUpHXBWiT9gwvId40A3eMrizQyNrG3Dl1 d50g== 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=8ewZ9drzmQCFjZnBVwS6fu3g7oZgLJYSUNUhMXTXoqM=; fh=fMpPbDoZRiqJWom8j/xf2nyI6HcMVQ2M9GFQTjKRh8g=; b=vqyNlKWnPVeXmiJnOkzsHQ+ywWgy9Oy8eUK8WxxLvQTPMj64x1/BCpSVPuFd6+u/bh wV2kQ6Wd5zCsa4jXwGWkcjlqTd96qKEUHYrSvQr2A6HmvsUkcMLMtqXARY4lJgKjvC3U HO88VqoCOjj1ErpjOCfnM4bVySpvyge8WlmIaUC/Y0g1/V+WT12z0THn1rwvfXZhmzf2 hSyOJmSHPF6nz5/TAUYsZgiDomMuaXdfZV9w1pA6Yvkqt50NQU/K2MjzgEAP15LGYOUH +uF3UXQ0vaSJrMMu3hbarkqdTa1ixvQ0BspT4pYTeLluN3vVTmE4ofO0nerWcWZs+ZJe B1Vw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lsGLLUZo; 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-191340-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191340-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6822779ba0bsi6773364a12.418.2024.05.27.11.41.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 11:41:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191340-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lsGLLUZo; 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-191340-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191340-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B867E2816B1 for ; Mon, 27 May 2024 18:41:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7113168C3B; Mon, 27 May 2024 18:38:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lsGLLUZo" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 7C26A167DA0; Mon, 27 May 2024 18:38:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716835110; cv=none; b=ajGDqUbLraT65OL8qAVruahH0XrB1mJ+jRO4lVES5r0gsOiwNqE4cc2V7sKFlNiCgV2MJkzejYHjWeG4+MflN/PzT0QP2CSUOyvRx25UQxuG4A7A5JxeKpEWmJg6PkiAJ50Zsz8rB1E0mYpW+pBDo3PZISDVpsfC1pXCxaMUh4k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716835110; c=relaxed/simple; bh=07ieVIzyDj0NiEB/B7poc8uFFqzs0xmcNVnn7RCMamk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DLWG+WYphBdgS/uPFGZlYRShYz25NonJecfpoiv2Im7PzWsQUsdD1VHCUOIpZ6u4GwlByEG+q9StbYcgigFy/oaMtF7YyMuUXXXU1RMxA+ItSwf7KeSSioticb3SMm9LxoyXqIRj15cgCWfvlYdxNeu99HSLhxx+sG1nQUorO7E= 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=lsGLLUZo; arc=none smtp.client-ip=209.85.218.50 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-f50.google.com with SMTP id a640c23a62f3a-a6265d3ccf7so10284966b.0; Mon, 27 May 2024 11:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716835107; x=1717439907; 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=8ewZ9drzmQCFjZnBVwS6fu3g7oZgLJYSUNUhMXTXoqM=; b=lsGLLUZo3dyssiMbqpo59W5Ep/d1HpDF93C4Q1Yw8S8IsfoOiHNV2wtcuOVAPfQB41 GdT48Z5HfjKS5FbbASmAyOQVAqqEBAf4AXFvStfoKAmiSTxw9njAbCD2YQiMzVi/g7Sh +/ANDXR//mQJiMrlgru73g5SSQrZMEcnTp6qnkA8OpfQ0npQMVUO3F04BAA/fhLHsy2Y wjZy5/WDgn4fqkcvs7GcK8K6AE6teQgLvOhA2EifPTmNu/4eQrtQ8ikQ8s8pgyaM1ei6 3IYG+ToKTpQbC0r6o6n/Vaksb6nto9IsbL0/1mJ+SlCRdCs20m9YUbE+telRe+ByPnvX LbuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716835107; x=1717439907; 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=8ewZ9drzmQCFjZnBVwS6fu3g7oZgLJYSUNUhMXTXoqM=; b=hSIA/2oHX7V1/N4hmcy1Biq4BibrSMjWmLbxuPj4awnBtFa2fOVQxw3k6+eAIuENiy KTh+McqioJzY80d95vFvJllOXZ/vIqp9wsINCnk4yTTVxwH6pm5xFHSpBOEWf3O3OsGT l2b1bWccyuUU13A01N1gwHUyibnp/J59YFsyr/Xhy/pC4cIGFL+G+EsWWiizwvbYHOSu HpoxcV/dlUsYP0KhDBOjVRrONJhQm1IZjRu2d7ln7tpKc6LVzzogAQb7OF11o122l5X2 7mr2myfC+lSES8RjcYhWO0Shs8EknVsB+PpLjyftwedB3SvTkWyBTjAEU2StQzND/UNa j4yw== X-Forwarded-Encrypted: i=1; AJvYcCXkuXTanRVxJ1OUGpWH+90K+e9SmzUWh2+h5QwAMVqibDEPdhloevVcyYOII4ufxnGquW2JdOUUKKCl+7F+wQdaSovMGmJtEwp01RGTrCpjyeuM/ISG9vCpj2zh7QmY/dayzcxYbI2K X-Gm-Message-State: AOJu0YxGMVQYA12To4sU1WM7wWxJelh/LxqXCjlVbMOec1xs3KHunisP rPvUZ5JHH3zAR+V6vwJqOfzaN7fODIvA5d3TtRiX00+a+qkxM41m X-Received: by 2002:a17:906:13c4:b0:a59:c39b:6bc3 with SMTP id a640c23a62f3a-a6264f0e4d6mr675934866b.49.1716835106799; Mon, 27 May 2024 11:38:26 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:82:7577:4b45:3774:6be0:a177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cc52398sm513825266b.105.2024.05.27.11.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 11:38:26 -0700 (PDT) From: Vasileios Amoiridis To: jic23@kernel.org, lars@metafoo.de Cc: himanshujha199640@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Vasileios Amoiridis Subject: [PATCH v1 15/17] iio: chemical: bme680: Remove redundant gas configuration Date: Mon, 27 May 2024 20:38:03 +0200 Message-Id: <20240527183805.311501-16-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240527183805.311501-1-vassilisamir@gmail.com> References: <20240527183805.311501-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 afaa43ec3241..a91b15626ec8 100644 --- a/drivers/iio/chemical/bme680_core.c +++ b/drivers/iio/chemical/bme680_core.c @@ -669,13 +669,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