From: Jonathan Cameron <jic23@kernel.org>
To: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Cc: Siddharth Menon <simeddon@gmail.com>,
linux-iio@vger.kernel.org, lars@metafoo.de,
Michael.Hennerich@analog.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH] iio: frequency: ad9832: devicetree probing support
Date: Sun, 23 Mar 2025 11:59:47 +0000 [thread overview]
Message-ID: <20250323115947.4f23b6a6@jic23-huawei> (raw)
In-Reply-To: <Z969wZRJxMCyVuqy@debian-BULLSEYE-live-builder-AMD64>
On Sat, 22 Mar 2025 10:40:17 -0300
Marcelo Schmitt <marcelo.schmitt1@gmail.com> wrote:
> LGTM, one minor suggestion inline.
> With that applied,
> Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
>
> On 03/22, Siddharth Menon wrote:
> > Introduce struct for device match of_device_id
> >
> > Suggested-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
> > Signed-off-by: Siddharth Menon <simeddon@gmail.com>
> > ---
> > drivers/staging/iio/frequency/ad9832.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
> > index 9a27acd88926..506478ddede3 100644
> > --- a/drivers/staging/iio/frequency/ad9832.c
> > +++ b/drivers/staging/iio/frequency/ad9832.c
> > @@ -439,6 +439,13 @@ static int ad9832_probe(struct spi_device *spi)
> > return devm_iio_device_register(&spi->dev, indio_dev);
> > }
> >
> > +static const struct of_device_id ad9832_of_match[] = {
> > + { .compatible = "adi,ad9832" },
> > + { .compatible = "adi,ad9835" },
> > + {},
> I think Jonathan prefers to have a space separating the null terminator braces.
> { },
Indeed, but just for the record, no trailing comma on 'terminating entries'.
Whilst that's not in the style guide that is pretty much default preference
across the kernel (unlike the bracket things which is my random choice :)
Jonathan
>
> > +};
> > +MODULE_DEVICE_TABLE(of, ad9832_of_match);
> > +
> > static const struct spi_device_id ad9832_id[] = {
> > {"ad9832", 0},
> > {"ad9835", 0},
> > @@ -449,6 +456,7 @@ MODULE_DEVICE_TABLE(spi, ad9832_id);
> > static struct spi_driver ad9832_driver = {
> > .driver = {
> > .name = "ad9832",
> > + .of_match_table = ad9832_of_match,
> > },
> > .probe = ad9832_probe,
> > .id_table = ad9832_id,
> > --
> > 2.48.1
> >
next prev parent reply other threads:[~2025-03-23 11:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-22 8:07 [PATCH] iio: frequency: ad9832: devicetree probing support Siddharth Menon
2025-03-22 13:40 ` Marcelo Schmitt
2025-03-23 11:59 ` Jonathan Cameron [this message]
2025-03-22 14:13 ` 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=20250323115947.4f23b6a6@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=gregkh@linuxfoundation.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=marcelo.schmitt1@gmail.com \
--cc=simeddon@gmail.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