linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Ranostay <matt.ranostay@konsulko.com>
To: Daniel Gomez <dagmcr@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	javier@dowhile0.org
Subject: Re: [PATCH v2] iio: temperature: maxim_thermocouple: declare missing of table
Date: Thu, 25 Apr 2019 09:35:07 +0800	[thread overview]
Message-ID: <CAJCx=gkykSjn7uf67s2_NqB+-FYWF_oA_PknB7LcX5QRD_mp9Q@mail.gmail.com> (raw)
In-Reply-To: <1556055738-14838-1-git-send-email-dagmcr@gmail.com>

On Wed, Apr 24, 2019 at 5:42 AM Daniel Gomez <dagmcr@gmail.com> wrote:
>
> Add missing <of_device_id> table for SPI driver relying on SPI
> device match since compatible is in a DT binding or in a DTS.
>
> Before this patch:
> modinfo drivers/iio/temperature/maxim_thermocouple.ko | grep alias
> alias:          spi:max31855
> alias:          spi:max6675
>
> After this patch:
> modinfo drivers/iio/temperature/maxim_thermocouple.ko | grep alias
> alias:          spi:max31855
> alias:          spi:max6675
> alias:          of:N*T*Cmaxim,max31855C*
> alias:          of:N*T*Cmaxim,max31855
> alias:          of:N*T*Cmaxim,max6675C*
> alias:          of:N*T*Cmaxim,max6675

Heh oops I missed that somehow in initial development.

Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>

>
> Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
> Signed-off-by: Daniel Gomez <dagmcr@gmail.com>
> ---
>  drivers/iio/temperature/maxim_thermocouple.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/drivers/iio/temperature/maxim_thermocouple.c b/drivers/iio/temperature/maxim_thermocouple.c
> index c31b963..c613a64 100644
> --- a/drivers/iio/temperature/maxim_thermocouple.c
> +++ b/drivers/iio/temperature/maxim_thermocouple.c
> @@ -10,6 +10,8 @@
>  #include <linux/init.h>
>  #include <linux/mutex.h>
>  #include <linux/err.h>
> +#include <linux/of.h>
> +#include <linux/of_device.h>
>  #include <linux/spi/spi.h>
>  #include <linux/iio/iio.h>
>  #include <linux/iio/trigger.h>
> @@ -262,9 +264,17 @@ static const struct spi_device_id maxim_thermocouple_id[] = {
>  };
>  MODULE_DEVICE_TABLE(spi, maxim_thermocouple_id);
>
> +static const struct of_device_id maxim_thermocouple_of_match[] = {
> +        { .compatible = "maxim,max6675" },
> +        { .compatible = "maxim,max31855" },
> +        { },
> +};
> +MODULE_DEVICE_TABLE(of, maxim_thermocouple_of_match);
> +
>  static struct spi_driver maxim_thermocouple_driver = {
>         .driver = {
>                 .name   = MAXIM_THERMOCOUPLE_DRV_NAME,
> +               .of_match_table = maxim_thermocouple_of_match,
>         },
>         .probe          = maxim_thermocouple_probe,
>         .remove         = maxim_thermocouple_remove,
> --
> 2.7.4
>

  reply	other threads:[~2019-04-25  1:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 21:42 [PATCH v2] iio: temperature: maxim_thermocouple: declare missing of table Daniel Gomez
2019-04-25  1:35 ` Matt Ranostay [this message]
2019-04-27 12:55   ` 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='CAJCx=gkykSjn7uf67s2_NqB+-FYWF_oA_PknB7LcX5QRD_mp9Q@mail.gmail.com' \
    --to=matt.ranostay@konsulko.com \
    --cc=dagmcr@gmail.com \
    --cc=javier@dowhile0.org \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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).