Re: [PATCH v1 0/2] Add BMP390 IIO driver, device tree bindings and support

From: Vasileios Amoiridis
Date: Mon Jun 23 2025 - 18:00:48 EST


On Mon, Jun 23, 2025 at 07:37:51AM +0000, Mereena Mathai Liquancin (MS/EHM4-BST) wrote:
> Hi All,
>
> I apologize for submitting such a large code patch earlier. I am currently reworking the driver to simplify the implementation and make the code easier to review and maintain.
>
> Regarding the BMP2 and BMP3 devices, there are significant differences at the register level, so direct reuse of code is not feasible. However, I will carefully consider all the valuable feedback provided by the team to ensure the next version addresses the concerns raised.
>

Hi Liquacin,

Probably I didn't explain enough in my previous message.

The driver I mentioned under driver/iio/pressure/bmp280-core.c
is driving all the BMP085, BMP18x, BMP28x, BME28x, BMP38x, BMP58x.
Even though it is called "bmp280-core". Since the BMP39x is 100%
(or almost 100%) reg compatible with the BMP38x, you can use the
existing driver to control your device.

While writing this message I went to the code to give you some
guidelines on how to add support for the chip but I noticed that
the BMP390 is already supported here [1] since
Commit b19ac45bfe50 ("iio: pressure: bmp280: Add support for BMP390").

This commit does not add a specific compatible for the BMP390 device,
but it looks like if you use the compatible = "bosch,bmp380" on your
device-tree it should work with your sensor.

I hope the situation is more clear now.

Cheers,
Vasilis

[1]: https://github.com/torvalds/linux/blob/master/drivers/iio/pressure/bmp280-core.c#L1958

> I also plan to remove some unnecessary device tree nodes and redundant logic to streamline the driver further.
>
> Thank you for taking the time to verify and review the patch. I appreciate the constructive comments and will incorporate them into the revised submission.
>
> Best regards,
>
> Liquancin Mereena Mathai
>
> BST Projects (MS/EHM3-BST)
> Bosch Global Software Technologies Private Limited
> (CIN: U72400KA1997PTC023164) | KGISL Infrastructures Private Ltd - SEZ Keeranatham Village | Coimbatore | Tamil Nadu - 641035 | INDIA | www.bosch-softwaretechnologies.com
> Liquancin.MereenaMathai@xxxxxxxxxxxx
>
> Registered Office: Bosch Global Software Technologies Private Limited - (CIN: U72400KA1997PTC023164)
> (Formerly known as Robert Bosch Engineering and Business Solutions Pvt. Ltd.)
> 123, Industrial Layout, Hosur Road, Koramangala, Bengaluru - 560095, India
> Managing Director: Mr. Dattatri Salagame
>
> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
> Sent: Monday, June 23, 2025 12:37 PM
> To: Mereena Mathai Liquancin (MS/EHM4-BST) <liquancin.mereenamathai@xxxxxxxxxxxx>
> Cc: linux-iio@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; jic23@xxxxxxxxxx; dlechner@xxxxxxxxxxxx; nuno.sa@xxxxxxxxxx; andy@xxxxxxxxxx; vassilisamir@xxxxxxxxx; marcelo.schmitt1@xxxxxxxxx; javier.carrasco.cruz@xxxxxxxxx; ZHANG Xu (BST/ESA2) <Xu.Zhang@xxxxxxxxxxxx>; BIAN Maoting (BST/ESA2) <Maoting.Bian@xxxxxxxxxxxx>
> Subject: Re: [PATCH v1 0/2] Add BMP390 IIO driver, device tree bindings and support
>
> On Fri, Jun 20, 2025 at 10:24:53AM +0530, liquancin.mereenamathai@xxxxxxxxxxxx wrote:
> > From: Liquancin Mereena Mathai <liquancin.mereenamathai@xxxxxxxxxxxx>
> >
> > This patch series adds support for the Bosch BMP390 pressure sensor to
> > the Linux IIO subsystem. It includes the main driver implementation as
> > well as the necessary device tree bindings for integration on supported platforms.
> >
> > Patch 1 adds the IIO driver for the BMP390 pressure sensor.
> > Patch 2 introduces the device tree bindings documentation.
>
> > 16 files changed, 7296 insertions(+)
>
> You are kidding me.
> Please, take your time to start with something really basic.
> Also, can you explain how this driver is not duplicate of the (any of the) existing ones in IIO?
>
>
> --
> With Best Regards,
> Andy Shevchenko
>
>