[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <74607630-3ee3-43b0-88b0-37ea1bef6dc5@baylibre.com>
Date: Thu, 11 Sep 2025 14:01:17 -0500
From: David Lechner <dlechner@...libre.com>
To: Petre Rodan <petre.rodan@...dimension.ro>,
Jonathan Cameron <jic23@...nel.org>, Nuno Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 04/14] iio: accel: bma220: split original driver
On 9/10/25 2:57 AM, Petre Rodan wrote:
> In preparation for the i2c module, move the original code into multiple
> source files without any other functional change.
>
> Create the additional bma220_core module.
> Fix checkpatch warning about GPL v2 license in bma220_spi.c.
>
> Signed-off-by: Petre Rodan <petre.rodan@...dimension.ro>
> ---
> Changes:
> - split out open firmware table modification into separate patch
> - bma220_write_raw() exits without dev_err() based on similar feedback
> from David
> - change includes in bma220.h
> - include bma220.h in bma220_core.c
> - add mutex.h and pm.h includes to bma220_core.c
> - cleanup struct spacing in bma220_spi.c
> ---
> drivers/iio/accel/Kconfig | 9 +-
> drivers/iio/accel/Makefile | 3 +-
> drivers/iio/accel/bma220.h | 19 +++
> drivers/iio/accel/bma220_core.c | 313 ++++++++++++++++++++++++++++++++++++++++
> drivers/iio/accel/bma220_spi.c | 307 ++-------------------------------------
> 5 files changed, 354 insertions(+), 297 deletions(-)
>
> diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig
> index 8c3f7cf55d5fa432a4d4662b184a46cd59c3ebca..2cc3075e26883df60b5068c73b0551e1dd02c32e 100644
> --- a/drivers/iio/accel/Kconfig
> +++ b/drivers/iio/accel/Kconfig
> @@ -218,15 +218,20 @@ config BMA180
>
> config BMA220
> tristate "Bosch BMA220 3-Axis Accelerometer Driver"
> - depends on SPI
I think we still want to keep `depends on SPI`. (And later add `|| I2C`)
There isn't much point in allowing this on systems that it can't
communicate with.
> select IIO_BUFFER
> select IIO_TRIGGERED_BUFFER
> + select BMA220_SPI if SPI
> help
> Say yes here to add support for the Bosch BMA220 triaxial
> acceleration sensor.
>
> To compile this driver as a module, choose M here: the
> - module will be called bma220_spi.
> + module will be called bma220_core and you will also get
> + bma220_spi if SPI is enabled.
> +
> +config BMA220_SPI
> + tristate
> + depends on BMA220
>
> config BMA400
> tristate "Bosch BMA400 3-Axis Accelerometer Driver"
Powered by blists - more mailing lists