Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2217648lqb; Mon, 27 May 2024 11:38:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTRmcZZV5dMTJoCsrhh66qImLP7/+g/+GKsXX5re/HLGbr6bkdiOytQjcJjoPJ8ploXfFGqGC0aeVoglRnf1aVNudCvWGsT9Pn8gwO0g== X-Google-Smtp-Source: AGHT+IFuQMCJEn0B1vw11VHAUsyuJ1iiy9Juw8A3ukZQVjTOkAjN0uE/zIO1qa2YYbhiu3P70E32 X-Received: by 2002:a05:6214:3104:b0:6ad:638c:a89c with SMTP id 6a1803df08f44-6ad638ca97amr105392536d6.53.1716835109094; Mon, 27 May 2024 11:38:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716835109; cv=pass; d=google.com; s=arc-20160816; b=PEKK2ChupOAOJ7SkNmNrPXX1zeyaLrXoecDg//xerG9UeknXd7l7BQCPeDnQUVOtg1 Rgjk5yQmKxCOuKCNPSwh8ghDvSBbSdulIDeaxDECEFj4hRclBH+u/m4LvV57GBwzlyti qKqUj0jMdcJCySyC9PZmWs5gFM7k2oXg19s2DnFYguv9nk70v1P4Xz2AbMx/RmZ86Tjw DcAijTfpTcu/h4ppFLGYyYbBvhW4I+8gZ88v3FmX7GaOcoIx2j6Wp8LM+bcIS9wxmhMi Co8t442qGFUSUeWkS08NHxxjchy62BD8Dxa9AtVv+ZOxBz4c3TJ3OE3wMQydG/VTXDZN gzzQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=CyBhQx1agwSxo805DtO3PqMKr3RwM0Dt9Oyo7650Co8=; fh=F4KzOCuIVMspqmEgKH03kTJfx+fowVjwM1zrT9jvaDE=; b=FGUigEi4gir/gQmZjTQVdAqLN7fRzWIn/TBdlgLfYEi17TyYjzgUDh37eSxp2G3624 wFb9Iq4jT9r7Y9SOcGyE9EFFeKiAaYeihDdzTugVRoJO5MzzF9oLoT1T/etj3c2mRNfu TE4JZNR3K+J1HkfzDw/0OM3/ZEi9H/IzyNz+v+87wJG5wRs2LT6cStF6d9nhd/sSOR3t S6hXsfmFYDLuarRIHJBK2o9YvsOLiy5+dawx1RS68WlbCSvBk8IXnCjg8VtBU5CG3JEV HOddloLf1pDYid7zVBD/DH3JZ2aCWcY3jLOdt0RAQFj8mKlkDypLwd35ax1UrWzjLHsy 46sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bMX5oSSF; 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-191325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191325-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac06f4fde0si86385776d6.96.2024.05.27.11.38.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 11:38:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bMX5oSSF; 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-191325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191325-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BF77E1C2189F for ; Mon, 27 May 2024 18:38:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34C3715FA83; Mon, 27 May 2024 18:38:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bMX5oSSF" Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 75D302F2B; Mon, 27 May 2024 18:38:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716835097; cv=none; b=pzyXAF5z8608VWIh64J8l5nneFTtQU69LqjDty/WOlpH/2JIlmNTLjAHN2sD9VQRNTBgFSbYvCUQ4jh5mmbgviqVtoUx9tKjsGuGpP27TnwuaJT/y7ucLrHxOjTn9ABzMlFMDOSzaiSL+OyJJH8YLaxi9eQzTyRiCDfNjnpZL8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716835097; c=relaxed/simple; bh=tMnPK23Bd3KunVXr8QqXPDCAM3j6iocEKexgtzGTs8c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=upntH2Z+w/kNwLoe28jksJlygsAK4C2DRi95a1iDFzoMmdyjm3rAWVANaeNMJOzsc9WKhP2q2zSdnFlME8yVsp/J7MEO97G3DtlIu0aUKsOYuxrxkja8lHXYwREYyj2ajjne76HNvOFC3+XekgdyI/Co88vF/SSKI1tlNEaxGSY= 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=bMX5oSSF; arc=none smtp.client-ip=209.85.218.45 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-f45.google.com with SMTP id a640c23a62f3a-a626777f74eso7066766b.3; Mon, 27 May 2024 11:38:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716835094; x=1717439894; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CyBhQx1agwSxo805DtO3PqMKr3RwM0Dt9Oyo7650Co8=; b=bMX5oSSFH5jXUtPrrLUxz54ExgUnL9JMteg6l4aq59Dt7kZL6kZRp3X5oH1RkpQzeO qQTzNKVQaeFmaneyCjj9q6wXEeTvZHUTtBw1LEjG++9rOpxWqbk5VJLySFv1YiNCwPon jxCoD8dDUgqzZhiJOXjWdjFSbHLGgrUbE1LvKWTEL5joSLp72kZsU2bbdNExYYJkH+d3 llv3wKlJwAtNFVaRM+9V9blE34Zx4vG3aKx1yokxjhjhE1sf17d4mJSHsy9Da+0U9wX3 9wzqfqZPYSFPe4h712n77dtE5zp0qouV7Mau8+zai05fJqshyrzYitj80bPJVhf5FlC9 UvCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716835094; x=1717439894; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CyBhQx1agwSxo805DtO3PqMKr3RwM0Dt9Oyo7650Co8=; b=ZdM/gLd1NcoiPTDQ8m+W1huQd5r2FHHLdat2HLzqJSXfCDa2cQ1gVjFL0YDBdEIjdX /4IvEvv0K4BDht4785Mx2k7Y8cYX4OTloGnqM3G3oumTr19gn4gXmbVg9cGi1OlJIpav /vy8ECUtcGX5Fqq3sIaXD2+YiZ27pzHmRDauukLgeI9S+CobwpXyl5YhJ4C3a85yUe42 m+LL115qnOX4BPBZTH2WpKMRbKfDhpHn3ygytXFvofO3KhFhCbJS/fA6rphXlGHYf8T6 K6GelK1WR8U7YZEB4oQzTNPN+FWfY6sWQEbk2/tlEAW55lFvl7aZ8wnQPm9tsgAxkQjz Obqw== X-Forwarded-Encrypted: i=1; AJvYcCU+MqxYPqo0lHzRIw+utHWyztcb8gTfVREoCuq/JkPSavA15VncU1SmxWXX/pM+Uy9K1RBFqBi27Om1/JXopEveH2EVFN9d0dcfytgv0F5e3PgwnTBFcOzyBLRqdvYxDiV/VT9/wkRn X-Gm-Message-State: AOJu0YzZG9AvubcYYdSBBwcluc7U2RZqZYPE6moGFWJuLlIW51zYpl/h hAuY9jngNuIloacMS1oOt9BIHr5gu5wXImkEY/ThSdVoLS7QoBUG X-Received: by 2002:a17:906:185b:b0:a59:ea34:fe0d with SMTP id a640c23a62f3a-a6265119ae9mr1148217666b.47.1716835093568; Mon, 27 May 2024 11:38:13 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 11:38:12 -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 00/17] iio: chemical: bme680: Driver cleanup Date: Mon, 27 May 2024 20:37:48 +0200 Message-Id: <20240527183805.311501-1-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This started as a series to add support for buffers and the new BME688 but it ended up being just a cleaning series. These might be quite some patches for such a thing but I feel that they are are well split, in order to allow for better review. The patches are mostly small changes but essential for the correct use of the driver. The first patches looked like fixes that should be marked for the stable. Patches [11,17/17] might be a bit bigger but 11/17 is quite straightforward and 17/17 is basically a duplication of a very similar commit coming from the BMP280 driver [1]. In general, the datasheet [2] of the driver is not very descriptive, and it redirects the user to the BME68x Sensor API [3]. All the things that were identified from the BME68x Sensor API have been marked with links to the original locations of the GitHub code. If this is too much and we don't want this type of information on the commit message, please let me know and I will fix it. [1]: https://lore.kernel.org/linux-iio/20240512230524.53990-1-vassilisamir@gmail.com/T/#mc6f814e9a4f8c2b39015909d174c7013b3648b9b [2]: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf [3]: https://github.com/boschsensortec/BME68x_SensorAPI/tree/master Vasileios Amoiridis (17): iio: chemical: bme680: Fix pressure value output iio: chemical: bme680: Fix calibration data variable iio: chemical: bme680: Fix overflows in compensate() functions iio: chemical: bme680: Fix sensor data read operation iio: chemical: bme680: Fix type in define iio: chemical: bme680: Add mutexes to guard read/write to device iio: chemical: bme680: Drop unnecessary casts and correct adc data types iio: chemical: bme680: Remove remaining ACPI-only stuff iio: chemical: bme680: Sort headers alphabetically iio: chemical: bme680: Remove duplicate register read iio: chemical: bme680: Use bulk reads for calibration data iio: chemical: bme680: Allocate IIO device before chip initialization iio: chemical: bme680: Add read buffers in DMA safe region iio: chemical: bme680: Modify startup procedure iio: chemical: bme680: Remove redundant gas configuration iio: chemical: bme680: Move forced mode setup in ->read_raw() iio: chemical: bme680: Refactorize reading functions drivers/iio/chemical/bme680.h | 39 +- drivers/iio/chemical/bme680_core.c | 643 ++++++++++++++--------------- 2 files changed, 315 insertions(+), 367 deletions(-) base-commit: 409b6d632f5078f3ae1018b6e43c32f2e12f6736 -- 2.25.1