[PATCH v2] iio: imu: bmi270: fix dev_err_probe error msg

Rodrigo Gobbi posted 1 patch 1 month, 2 weeks ago
drivers/iio/imu/bmi270/bmi270_spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] iio: imu: bmi270: fix dev_err_probe error msg
Posted by Rodrigo Gobbi 1 month, 2 weeks ago
The bmi270 can be connected to I2C or a SPI interface. If it is a SPI,
during probe, if devm_regmap_init() fails, it should print the "spi"
term rather "i2c".

Fixes: 92cc50a00574 ("iio: imu: bmi270: Add spi driver for bmi270 imu")
Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
---
Changelog:
v2: add trailing and fixes tag
v1: https://lore.kernel.org/all/20251010191055.28708-1-rodrigo.gobbi.7@gmail.com/
---
 drivers/iio/imu/bmi270/bmi270_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/imu/bmi270/bmi270_spi.c b/drivers/iio/imu/bmi270/bmi270_spi.c
index 19dd7734f9d0..80c9fa1d685a 100644
--- a/drivers/iio/imu/bmi270/bmi270_spi.c
+++ b/drivers/iio/imu/bmi270/bmi270_spi.c
@@ -60,7 +60,7 @@ static int bmi270_spi_probe(struct spi_device *spi)
 				  &bmi270_spi_regmap_config);
 	if (IS_ERR(regmap))
 		return dev_err_probe(dev, PTR_ERR(regmap),
-				     "Failed to init i2c regmap");
+				     "Failed to init spi regmap\n");
 
 	return bmi270_core_probe(dev, regmap, chip_info);
 }
-- 
2.48.1
Re: [PATCH v2] iio: imu: bmi270: fix dev_err_probe error msg
Posted by Andy Shevchenko 1 month, 2 weeks ago
On Sun, Nov 02, 2025 at 07:30:18PM -0300, Rodrigo Gobbi wrote:
> The bmi270 can be connected to I2C or a SPI interface. If it is a SPI,
> during probe, if devm_regmap_init() fails, it should print the "spi"
> term rather "i2c".

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v2] iio: imu: bmi270: fix dev_err_probe error msg
Posted by Jonathan Cameron 1 month, 1 week ago
On Mon, 3 Nov 2025 09:55:03 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Sun, Nov 02, 2025 at 07:30:18PM -0300, Rodrigo Gobbi wrote:
> > The bmi270 can be connected to I2C or a SPI interface. If it is a SPI,
> > during probe, if devm_regmap_init() fails, it should print the "spi"
> > term rather "i2c".  
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> 
Applied to the togreg branch of iio.git. I'm not in a particular
rush to get an error message fix in so this can wait for the next
merge window.

Thanks,

Jonathan