From: Jonathan Cameron <jic23@kernel.org>
To: Markuss Broks <markuss.broks@gmail.com>
Cc: nekodevelopper@gmail.com, Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 2/4] iio: accel: mc3230: add OF match table
Date: Sun, 12 Jan 2025 10:42:33 +0000 [thread overview]
Message-ID: <20250112104233.593beca0@jic23-huawei> (raw)
In-Reply-To: <108b1eeb-7e95-491e-83fc-bbd061697222@gmail.com>
On Sun, 12 Jan 2025 01:07:44 +0200
Markuss Broks <markuss.broks@gmail.com> wrote:
> On 1/11/25 10:11 PM, Vasiliy Doylov via B4 Relay wrote:
> > From: Vasiliy Doylov <nekodevelopper@gmail.com>
> >
> > This will make the driver probe-able via device-tree.
> > While the I2C match table may be sufficient, this should extend the cover
> > of this driver being probed by other methods.
> >
> > Signed-off-by: Vasiliy Doylov <nekodevelopper@gmail.com>
> > ---
> > drivers/iio/accel/mc3230.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/iio/accel/mc3230.c b/drivers/iio/accel/mc3230.c
> > index 48787c0494ae6f0ef1d4d22bc5a4608035cbe123..3cad6f2d7a2a79df38f90e5656763f6ed019a920 100644
> > --- a/drivers/iio/accel/mc3230.c
> > +++ b/drivers/iio/accel/mc3230.c
> > @@ -205,10 +205,17 @@ static const struct i2c_device_id mc3230_i2c_id[] = {
> > };
> > MODULE_DEVICE_TABLE(i2c, mc3230_i2c_id);
> >
> > +static const struct of_device_id mc3230_of_match[] = {
> > + { .compatible = "mcube,mc3230" },
> > + { },
> > +};
> > +MODULE_DEVICE_TABLE(of, mc3230_of_match);
> > +
> > static struct i2c_driver mc3230_driver = {
> > .driver = {
> > .name = "mc3230",
> > .pm = pm_sleep_ptr(&mc3230_pm_ops),
> > + .of_match_table = mc3230_of_match,
> Should also be alphabetic over here.
Why?
I'm on board with reordering this to be closer to the definitions
in struct device_driver, but alphabetic doesn't make much sense
in general for filling structures.
So I agree with reorder but not for that reason.
Jonathan
> > },
> > .probe = mc3230_probe,
> > .remove = mc3230_remove,
next prev parent reply other threads:[~2025-01-12 10:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-11 20:11 [PATCH 0/4] iio: accel: mc3230: add mount matrix, of match and mc3510c support Vasiliy Doylov via B4 Relay
2025-01-11 20:11 ` [PATCH 1/4] iio: accel: mc3230: add mount matrix support Vasiliy Doylov via B4 Relay
2025-01-12 10:48 ` Jonathan Cameron
2025-01-11 20:11 ` [PATCH 2/4] iio: accel: mc3230: add OF match table Vasiliy Doylov via B4 Relay
2025-01-11 23:07 ` Markuss Broks
2025-01-12 10:42 ` Jonathan Cameron [this message]
2025-01-12 10:46 ` Jonathan Cameron
2025-01-11 20:11 ` [PATCH 3/4] iio: accel: mc3230: add mc3510c support Vasiliy Doylov via B4 Relay
2025-01-11 23:04 ` Markuss Broks
2025-01-12 10:52 ` Jonathan Cameron
2025-01-12 11:01 ` Jonathan Cameron
2025-01-11 20:11 ` [PATCH 4/4] dt-bindings: iio: accel: mc3230: document mc3510c Vasiliy Doylov via B4 Relay
2025-01-11 22:46 ` Markuss Broks
2025-01-12 11:03 ` Jonathan Cameron
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=20250112104233.593beca0@jic23-huawei \
--to=jic23@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markuss.broks@gmail.com \
--cc=nekodevelopper@gmail.com \
--cc=robh@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