From: Kanak Shilledar <Kanak.Shilledar@axis.com>
To: "u.kleine-koenig@baylibre.com" <u.kleine-koenig@baylibre.com>
Cc: "dlechner@baylibre.com" <dlechner@baylibre.com>,
Henrik Grimler <Henrik.Grimler@axis.com>,
"nuno.sa@analog.com" <nuno.sa@analog.com>,
"jean-baptiste.maneyrol@tdk.com" <jean-baptiste.maneyrol@tdk.com>,
"robh@kernel.org" <robh@kernel.org>,
"jic23@kernel.org" <jic23@kernel.org>,
"andy@kernel.org" <andy@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
Kernel <Kernel@axis.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/3] iio: accel: Add support for ICM42370P
Date: Fri, 7 Aug 2026 13:11:27 +0000 [thread overview]
Message-ID: <0470d70cd9d3787b5759b00f424b06f58830c094.camel@axis.com> (raw)
In-Reply-To: <anV_NpsTKyQN26ip@monoceros>
[-- Attachment #1: Type: text/plain, Size: 2812 bytes --]
Hello!
Thanks for reviewing the code.
On Fri, 2026-08-07 at 08:51 +0200, Uwe Kleine-König wrote:
> Hello,
>
> On Thu, Aug 06, 2026 at 02:46:28PM +0200, Kanak Shilledar wrote:
> > diff --git a/drivers/iio/accel/inv_icm42370_core.c
> > b/drivers/iio/accel/inv_icm42370_core.c
> > new file mode 100644
> > index 0000000000000..9f6c302e6f331
> > --- /dev/null
> > +++ b/drivers/iio/accel/inv_icm42370_core.c
> > @@ -0,0 +1,1251 @@
> > +// SPDX-License-Identifier: GPL-2.0-or-later
> > +/*
> > + * Copyright (C) 2020 Invensense, Inc.
> > + * Copyright (C) 2026 Axis Communications AB
> > + */
> > +
> > +#include <linux/delay.h>
> > +#include <linux/device.h>
> > +#include <linux/i2c.h>
> > +#include <linux/irq.h>
> > +#include <linux/slab.h>
> > +#include <linux/mod_devicetable.h>
>
> <linux/i2c.h> already provides structs i2c_device_id and
> of_device_id.
> So please drop the explicit include for <linux/mod_devicetable.h>, as
> this will go away soon.
Will fix them.
> > +#include <linux/module.h>
> > +#include <linux/pm_runtime.h>
> > +#include <linux/property.h>
> > +#include <linux/regmap.h>
> > +
> > +#include <linux/iio/common/inv_sensors_timestamp.h>
> > +#include <linux/iio/iio.h>
> > +#include <linux/iio/sysfs.h>
> > +
> > [...]
> > +static const struct i2c_device_id inv_icm42370_id[] = { {
> > "icm42370",
> > + INV_CHIP_ICM42370 },
> > + {} };
>
> Please use named initializers and saner code style. I suggest:
>
> static const struct i2c_device_id inv_icm42370_id[] = {
> { .name = "icm42370", .driver_data = INV_CHIP_ICM42370 },
> { }
> };
Thanks for the suggestion. Will fix the formatting.
> > +MODULE_DEVICE_TABLE(i2c, inv_icm42370_id);
> > +
> > +/**
> > + * inv_icm42370_of_matches - struct for all the compatibe strings
> > + *
> > + */
> > +static const struct of_device_id inv_icm42370_of_matches[] = {
> > + {
> > + .compatible = "invensense,icm42370",
> > + .data = (void *)INV_CHIP_ICM42370,
> > + },
> > + {}
>
> { } please
Here as well.
>
> > +};
> > +MODULE_DEVICE_TABLE(of, inv_icm42370_of_matches);
> > +
> > +static struct i2c_driver inv_icm42370_driver = {
> > + .driver = {
> > + .name = "inv-icm42370-i2c",
> > + .of_match_table = inv_icm42370_of_matches,
> > + },
> > + .probe = inv_icm42370_probe,
>
> .id_table = inv_icm42370_id,
Will add the property.
> > +};
> > +module_i2c_driver(inv_icm42370_driver);
> > +
> > +MODULE_AUTHOR("Kanak Shilledar <kanak.shilledar@axis.com>");
> > +MODULE_AUTHOR("Henrik Grimler <henrik.grimler@axis.com>");
> > +MODULE_DESCRIPTION("InvenSense ICM-42370P I2C driver");
> > +MODULE_LICENSE("GPL");
> > +MODULE_IMPORT_NS("IIO_ICM42370");
>
> Best regards
> Uwe
Thanks and Regards,
Kanak Shilledar
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-08-07 13:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 12:46 [PATCH 0/3] Add driver for Invensense ICM42370P accelerometer Kanak Shilledar
2026-08-06 12:46 ` [PATCH 1/3] dt-bindings: Add InvenSense ICM-42370-p accelerometer Kanak Shilledar
2026-08-06 12:53 ` sashiko-bot
2026-08-07 10:16 ` Joshua Crofts
2026-08-07 13:15 ` Kanak Shilledar
2026-08-06 12:46 ` [PATCH 2/3] iio: accel: Add support for ICM42370P Kanak Shilledar
2026-08-06 13:02 ` sashiko-bot
2026-08-07 6:51 ` Uwe Kleine-König
2026-08-07 13:11 ` Kanak Shilledar [this message]
2026-08-07 10:09 ` Joshua Crofts
2026-08-07 13:41 ` Kanak Shilledar
2026-08-07 14:13 ` Joshua Crofts
2026-08-06 12:46 ` [PATCH 3/3] iio: accel: icm42370: Add FIFO buffer functionality Kanak Shilledar
2026-08-06 13:03 ` sashiko-bot
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=0470d70cd9d3787b5759b00f424b06f58830c094.camel@axis.com \
--to=kanak.shilledar@axis.com \
--cc=Henrik.Grimler@axis.com \
--cc=Kernel@axis.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jean-baptiste.maneyrol@tdk.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/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