From: Krzysztof Kozlowski <krzk@kernel.org>
To: liquancin.mereenamathai@in.bosch.com, linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, jic23@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
vassilisamir@gmail.com, marcelo.schmitt1@gmail.com,
javier.carrasco.cruz@gmail.com, Xu.Zhang@cn.bosch.com,
Maoting.Bian@cn.bosch.com
Subject: Re: [PATCH v1 1/2] Add the iio driver for bosch pressure sensor bmp390. The bmp390 is a pressure sensor module. It will support SPI and I2C protocol based on configuration.
Date: Fri, 20 Jun 2025 07:49:16 +0200 [thread overview]
Message-ID: <5e39d279-b981-4735-9a5a-f28069474d5f@kernel.org> (raw)
In-Reply-To: <20250620045456.1151-2-liquancin.mereenamathai@in.bosch.com>
On 20/06/2025 06:54, liquancin.mereenamathai@in.bosch.com wrote:
> From: Liquancin Mereena Mathai <liquancin.mereenamathai@in.bosch.com>
>
> Implemented features:
> * raw data access for pressure and temp through sysfs
> * iio buffer tool support for continuous sampling
>
> Signed-off-by: Liquancin Mereena Mathai <liquancin.mereenamathai@in.bosch.com>
> ---
> MAINTAINERS | 7 +
> drivers/iio/pressure/Kconfig | 26 +
> drivers/iio/pressure/Makefile | 1 +
> drivers/iio/pressure/bmp390/Kconfig | 29 +
> drivers/iio/pressure/bmp390/Makefile | 32 +
> drivers/iio/pressure/bmp390/bmp3.c | 2781 +++++++++++++++++
> drivers/iio/pressure/bmp390/bmp3.h | 537 ++++
> drivers/iio/pressure/bmp390/bmp390_driver.c | 1604 ++++++++++
> drivers/iio/pressure/bmp390/bmp390_driver.h | 232 ++
> drivers/iio/pressure/bmp390/bmp390_i2c.c | 328 ++
> .../iio/pressure/bmp390/bmp390_iio_buffer.c | 220 ++
> drivers/iio/pressure/bmp390/bmp390_spi.c | 286 ++
> drivers/iio/pressure/bmp390/bmp3_defs.h | 871 ++++++
> drivers/iio/pressure/bmp390/bmp3_selftest.c | 184 ++
> drivers/iio/pressure/bmp390/bmp3_selftest.h | 93 +
> 15 files changed, 7231 insertions(+)
> create mode 100644 drivers/iio/pressure/bmp390/Kconfig
> create mode 100644 drivers/iio/pressure/bmp390/Makefile
> create mode 100644 drivers/iio/pressure/bmp390/bmp3.c
> create mode 100644 drivers/iio/pressure/bmp390/bmp3.h
> create mode 100644 drivers/iio/pressure/bmp390/bmp390_driver.c
> create mode 100644 drivers/iio/pressure/bmp390/bmp390_driver.h
> create mode 100644 drivers/iio/pressure/bmp390/bmp390_i2c.c
> create mode 100644 drivers/iio/pressure/bmp390/bmp390_iio_buffer.c
> create mode 100644 drivers/iio/pressure/bmp390/bmp390_spi.c
> create mode 100644 drivers/iio/pressure/bmp390/bmp3_defs.h
> create mode 100644 drivers/iio/pressure/bmp390/bmp3_selftest.c
> create mode 100644 drivers/iio/pressure/bmp390/bmp3_selftest.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 1abec3f7d42b..f962f64d9a9e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -27447,6 +27447,13 @@ S: Maintained
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
> F: sound/pci/hda/patch_senarytech.c
>
> +BOSCH SENSORTEC BMP390 PRESSURE IIO DRIVER
> +M: Liquancin Mereena Mathai <liquancin.mereenamathai@in.bosch.com>
> +L: linux-iio@vger.kernel.org
> +S: Maintained
> +F: Documentation/devicetree/bindings/iio/pressure/bosch,bmp390.yaml
> +F: drivers/iio/pressure/bmp390/*
> +
> THE REST
> M: Linus Torvalds <torvalds@linux-foundation.org>
> L: linux-kernel@vger.kernel.org
> diff --git a/drivers/iio/pressure/Kconfig b/drivers/iio/pressure/Kconfig
> index d2cb8c871f6a..ffa5a1c76e06 100644
> --- a/drivers/iio/pressure/Kconfig
> +++ b/drivers/iio/pressure/Kconfig
> @@ -6,6 +6,32 @@
>
> menu "Pressure sensors"
>
> +menu "Bosch BMP390 pressure sensor driver"
> +config BMP390_IIO
> + tristate "Bosch BMP390 pressure sensor driver"
> + depends on IIO
> + help
> + Say yes here to build support for the Bosch BMP390 pressure sensor.
> +
> +
> + The Bosch BMP390 is a high-precision, low-power digital pressure sensor
Messed indentation. Look at other entries - what is the indentation there?
> + designed for a wide range of applications, including weather monitoring,
> + altitude tracking, and indoor navigation. This driver provides support
> + for interfacing with the BMP390 sensor through the Industrial I/O (IIO)
> + subsystem.
> +
> + If you choose to compile this driver as a module, it will be named
> + 'bmp390'. This allows the driver to be dynamically loaded and unloaded
> + as needed, providing flexibility in managing the sensor.
> +
> + To compile this driver as a module, choose M here: the module will be
> + called bmp390. If you are unsure, it is safe to say 'N' here.
> +
...
> +
> diff --git a/drivers/iio/pressure/bmp390/bmp3_selftest.h b/drivers/iio/pressure/bmp390/bmp3_selftest.h
> new file mode 100644
> index 000000000000..ab6c4a992011
> --- /dev/null
> +++ b/drivers/iio/pressure/bmp390/bmp3_selftest.h
> @@ -0,0 +1,93 @@
> +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
> +/**
> + * @section LICENSE
> + * Copyright (c) 2024 Bosch Sensortec GmbH All Rights Reserved.
> + *
> + * This software program is licensed subject to the GNU General
> + * Public License (GPL).Version 2,June 1991,
> + * available at http://www.fsf.org/copyleft/gpl.html
> + *
> + * @file bmp3_selftest.h
> + * @date 2024-12-04
> + * @version v2.1.0
> + *
Again...
> + */
> +
> +#ifndef BMP38X_SELFTEST_H_
> +#define BMP38X_SELFTEST_H_
> +
> +/*! CPP guard */
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
No. We don't do C++ in the kernel. Don't upstream your user-space driver
or any other code looking 100% different than everything else in the
kernel. Instead take existing, most recent, reviewed kernel driver and
use it as starting point.
Entire driver has poor style, with these javadoc or doxygen annotations.
Or useless comments like "static functions declaration". That's not kernel.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-06-20 5:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 4:54 [PATCH v1 0/2] Add BMP390 IIO driver, device tree bindings and support liquancin.mereenamathai
2025-06-20 4:54 ` [PATCH v1 1/2] Add the iio driver for bosch pressure sensor bmp390. The bmp390 is a pressure sensor module. It will support SPI and I2C protocol based on configuration liquancin.mereenamathai
2025-06-20 5:49 ` Krzysztof Kozlowski [this message]
2025-06-20 13:19 ` David Lechner
2025-06-21 8:55 ` kernel test robot
2025-06-22 16:08 ` Jonathan Cameron
2025-06-20 4:54 ` [PATCH v1 2/2] dt-bindings: iio driver: Add BMP390 pressure sensor device tree binding liquancin.mereenamathai
2025-06-20 5:45 ` Krzysztof Kozlowski
2025-06-22 15:06 ` [PATCH v1 0/2] Add BMP390 IIO driver, device tree bindings and support Jonathan Cameron
2025-06-22 22:34 ` Vasileios Amoiridis
2025-06-23 7:07 ` Andy Shevchenko
2025-06-23 7:37 ` Mereena Mathai Liquancin (MS/EHM4-BST)
2025-06-23 21:59 ` Vasileios Amoiridis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5e39d279-b981-4735-9a5a-f28069474d5f@kernel.org \
--to=krzk@kernel.org \
--cc=Maoting.Bian@cn.bosch.com \
--cc=Xu.Zhang@cn.bosch.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liquancin.mereenamathai@in.bosch.com \
--cc=marcelo.schmitt1@gmail.com \
--cc=nuno.sa@analog.com \
--cc=vassilisamir@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).