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.

From: David Lechner
Date: Fri Jun 20 2025 - 09:19:43 EST


On 6/19/25 11:54 PM, liquancin.mereenamathai@xxxxxxxxxxxx wrote:
> From: Liquancin Mereena Mathai <liquancin.mereenamathai@xxxxxxxxxxxx>
>
> Implemented features:
> * raw data access for pressure and temp through sysfs
> * iio buffer tool support for continuous sampling

A driver only doing these two things should be 100s of lines, not
thousands. Clearly, there is a lot more going on than this.

So in addition to Krzysztof's advice, please split out the driver into
separate patches for different features. Ideally a whole series is 1000
or maybe 1500 lines max and individual patches 500 lines max. This will
make it much easier to review and it will give you a chance to explain
things in more detail in each commit message.

>
> Signed-off-by: Liquancin Mereena Mathai <liquancin.mereenamathai@xxxxxxxxxxxx>
> ---
> 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(+)