[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220509134629.440965-6-Qing-wu.Li@leica-geosystems.com.cn>
Date: Mon, 9 May 2022 13:46:29 +0000
From: LI Qingwu <Qing-wu.Li@...ca-geosystems.com.cn>
To: jic23@...nel.org, lars@...afoo.de, mchehab+huawei@...nel.org,
ardeleanalex@...il.com, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, Qing-wu.Li@...ca-geosystems.com.cn
Subject: [PATCH V1 5/5] iio: accel: bmi088: modifed the device name.
It is possible to have multiple sensors connected on the same platform,
The commit makes it possible to obtain the device name for
the different chips according to the connected chip ID.
To be compatible with previous versions, renambmi088a to bmi088-accel.
Signed-off-by: LI Qingwu <Qing-wu.Li@...ca-geosystems.com.cn>
---
drivers/iio/accel/bmi088-accel-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/accel/bmi088-accel-core.c b/drivers/iio/accel/bmi088-accel-core.c
index 7c78cfb321ee..8f6920dc2ad9 100644
--- a/drivers/iio/accel/bmi088-accel-core.c
+++ b/drivers/iio/accel/bmi088-accel-core.c
@@ -461,7 +461,7 @@ static const struct iio_chan_spec bmi088_accel_channels[] = {
static const struct bmi088_accel_chip_info bmi088_accel_chip_info_tbl[] = {
[0] = {
- .name = "bmi088a",
+ .name = "bmi088-accel",
.chip_id = 0x1E,
.channels = bmi088_accel_channels,
.num_channels = ARRAY_SIZE(bmi088_accel_channels),
@@ -561,7 +561,7 @@ int bmi088_accel_core_probe(struct device *dev, struct regmap *regmap,
indio_dev->channels = data->chip_info->channels;
indio_dev->num_channels = data->chip_info->num_channels;
- indio_dev->name = name ? name : data->chip_info->name;
+ indio_dev->name = data->chip_info->name;
indio_dev->available_scan_masks = bmi088_accel_scan_masks;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &bmi088_accel_info;
--
2.25.1
Powered by blists - more mailing lists