From: Alexandru Ardelean <ardeleanalex@gmail.com>
To: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
mchehab+huawei@kernel.org, linux-iio <linux-iio@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V1 5/5] iio: accel: bmi088: modifed the device name.
Date: Tue, 10 May 2022 10:35:31 +0300 [thread overview]
Message-ID: <CA+U=DsoTgX5kjVshqKYa0rcL7MMWER9Q5njnVd7WRpkq+YCAHQ@mail.gmail.com> (raw)
In-Reply-To: <20220509134629.440965-6-Qing-wu.Li@leica-geosystems.com.cn>
On Mon, May 9, 2022 at 4:46 PM LI Qingwu
<Qing-wu.Li@leica-geosystems.com.cn> wrote:
>
> 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@leica-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;
This makes the 'name' parameter unused now.
Which begs the question if it should be removed.
One other detail is that the device-tree will need to set a compatible
string to 'bmi088-accel' and this will work (for SPI devices) for all
chip-types (including the new ones).
This raises the question of whether we should update the new chips in
the DT yaml doc here?
Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
properties:
compatible:
enum:
- bosch,bmi088-accel
If yes, then the 'drivers/iio/accel/bmi088-accel-spi.c' file also
requires an update with the new device-names.
> + 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
>
prev parent reply other threads:[~2022-05-10 7:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 13:46 [PATCH V1 0/5] iio: accel: bmi088: support BMI085 BMI090L LI Qingwu
2022-05-09 13:46 ` [PATCH V1 1/5] iio: accel: bmi088: Modified the scale calculate LI Qingwu
2022-05-10 6:01 ` Alexandru Ardelean
2022-05-14 15:14 ` Jonathan Cameron
2022-05-09 13:46 ` [PATCH V1 2/5] iio: accel: bmi088: Add support for bmi085 accel LI Qingwu
2022-05-10 6:04 ` Alexandru Ardelean
2022-05-09 13:46 ` [PATCH V1 3/5] iio: accel: bmi088: Add support for bmi090l accel LI Qingwu
2022-05-10 6:05 ` Alexandru Ardelean
2022-05-09 13:46 ` [PATCH V1 4/5] iio: accel: bmi088: Make it possible to config scales LI Qingwu
2022-05-09 17:24 ` kernel test robot
2022-05-09 18:50 ` kernel test robot
2022-05-10 7:01 ` Alexandru Ardelean
2022-05-09 13:46 ` [PATCH V1 5/5] iio: accel: bmi088: modifed the device name LI Qingwu
2022-05-10 7:35 ` Alexandru Ardelean [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+U=DsoTgX5kjVshqKYa0rcL7MMWER9Q5njnVd7WRpkq+YCAHQ@mail.gmail.com' \
--to=ardeleanalex@gmail.com \
--cc=Qing-wu.Li@leica-geosystems.com.cn \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).