linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org,
	kernel@pyra-handheld.com
Subject: Re: [PATCH 1/2] iio: gyro: bmg160: add device tree compatibility table
Date: Sun, 24 Mar 2019 18:05:03 +0000	[thread overview]
Message-ID: <20190324180503.6dc1e36e@archlinux> (raw)
In-Reply-To: <090c92487ada60e81fca341ef24e5de33a11ec4b.1552922054.git.hns@goldelico.com>

On Mon, 18 Mar 2019 16:14:14 +0100
"H. Nikolaus Schaller" <hns@goldelico.com> wrote:

> Add of_match_table.
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
I'm not against doing this, but do note that there is still a back up
path in which the i2c_device_id table is used to match but without
the vendor part of the string.

I theory the plan is to eventually remove that, but it's not the
case that this driver could not be probed from devicetree previously.

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/iio/gyro/bmg160_i2c.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c
> index 90126a5a7663..934a092134f0 100644
> --- a/drivers/iio/gyro/bmg160_i2c.c
> +++ b/drivers/iio/gyro/bmg160_i2c.c
> @@ -54,10 +54,19 @@ static const struct i2c_device_id bmg160_i2c_id[] = {
>  
>  MODULE_DEVICE_TABLE(i2c, bmg160_i2c_id);
>  
> +static const struct of_device_id bmg160_of_match[] = {
> +	{ .compatible = "bosch,bmg160" },
> +	{ .compatible = "bosch,bmi055_gyro" },
> +	{ }
> +};
> +
> +MODULE_DEVICE_TABLE(of, bmg160_of_match);
> +
>  static struct i2c_driver bmg160_i2c_driver = {
>  	.driver = {
>  		.name	= "bmg160_i2c",
>  		.acpi_match_table = ACPI_PTR(bmg160_acpi_match),
> +		.of_match_table = bmg160_of_match,
>  		.pm	= &bmg160_pm_ops,
>  	},
>  	.probe		= bmg160_i2c_probe,


  reply	other threads:[~2019-03-24 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 15:14 [PATCH 0/2] iio: gyro: bmg160 add device tree support H. Nikolaus Schaller
2019-03-18 15:14 ` [PATCH 1/2] iio: gyro: bmg160: add device tree compatibility table H. Nikolaus Schaller
2019-03-24 18:05   ` Jonathan Cameron [this message]
2019-03-28 16:25     ` H. Nikolaus Schaller
2019-03-18 15:14 ` [PATCH 2/2] dt-bindings: iio: add Bosch BMG160 gyroscope sensor H. Nikolaus Schaller
2019-03-24 18:06   ` Jonathan Cameron
2019-03-28 16:29     ` H. Nikolaus Schaller
2019-03-31  6:40   ` Rob Herring

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=20190324180503.6dc1e36e@archlinux \
    --to=jic23@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hns@goldelico.com \
    --cc=kernel@pyra-handheld.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@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).