All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Marek Belisko <marek@goldelico.com>,
	robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	rob@landley.net, grant.likely@linaro.org
Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	NeilBrown <neilb@suse.de>
Subject: Re: [PATCH] iio: gyro: itg3200: Add DT support.
Date: Sat, 18 Jan 2014 11:55:56 +0000	[thread overview]
Message-ID: <52DA6BCC.7010402@kernel.org> (raw)
In-Reply-To: <1389475047-4353-1-git-send-email-marek@goldelico.com>



On 11/01/14 21:17, Marek Belisko wrote:
> Signed-off-by: NeilBrown <neilb@suse.de>
> Signed-off-by: Marek Belisko <marek@goldelico.com>
Unless it is very recent, I don't the the invensense vendor-prefix is in
vendor-prefixes.txt. Please add that to the patch.

Otherwise, there is nothing here that isn't covered by the trivial
i2c bindings - thus perhaps it should be an entry in bindings/i2c/trivial-devices.txt?

Personally I'm not that fond of the trivial file as a single location
for the relevant info makes more sense to me.  Still thought I'd bring
it up as a possibility.

Jonathan
> ---
>   .../devicetree/bindings/iio/gyro/itg3200.txt       | 22 ++++++++++++++++++++++
>   drivers/iio/gyro/itg3200_core.c                    |  9 +++++++++
>   2 files changed, 31 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/iio/gyro/itg3200.txt
>
> diff --git a/Documentation/devicetree/bindings/iio/gyro/itg3200.txt b/Documentation/devicetree/bindings/iio/gyro/itg3200.txt
> new file mode 100644
> index 0000000..b1b18dc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/gyro/itg3200.txt
> @@ -0,0 +1,22 @@
> +* InvenSense ITG-3200 gyroscope
> +
> +http://www.invensense.com/mems/gyro/itg3200.html
> +
> +Required properties:
> +
> +  - compatible : should be "invensense,itg3200"
> +  - reg : the I2C address of the sensor
> +
> +Optional properties:
> +
> +  - interrupt-parent : should be the phandle for the interrupt controller
> +  - interrupts : interrupt mapping for GPIO IRQ
> +
> +Example:
> +
> +itg3200@68 {
> +	compatible = "invensense,itg3200";
> +	reg = <0x68>;
> +	interrupt-parent = <&gpio2>;
> +	interrupts = <29 IRQ_TYPE_EDGE_RISING>;
> +};
> diff --git a/drivers/iio/gyro/itg3200_core.c b/drivers/iio/gyro/itg3200_core.c
> index 4d3f3b9..adbf20d 100644
> --- a/drivers/iio/gyro/itg3200_core.c
> +++ b/drivers/iio/gyro/itg3200_core.c
> @@ -374,10 +374,19 @@ static const struct i2c_device_id itg3200_id[] = {
>   };
>   MODULE_DEVICE_TABLE(i2c, itg3200_id);
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id itg3200_of_match[] = {
> +	{ .compatible = "invensense,itg3200", },
> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, itg3200_of_match);
> +#endif
> +
>   static struct i2c_driver itg3200_driver = {
>   	.driver = {
>   		.owner  = THIS_MODULE,
>   		.name	= "itg3200",
> +		.of_match_table = of_match_ptr(itg3200_of_match),
>   	},
>   	.id_table	= itg3200_id,
>   	.probe		= itg3200_probe,
>

  reply	other threads:[~2014-01-18 11:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-11 21:17 [PATCH] iio: gyro: itg3200: Add DT support Marek Belisko
2014-01-11 21:17 ` Marek Belisko
2014-01-18 11:55 ` Jonathan Cameron [this message]
2014-01-18 21:57 ` Marek Belisko
2014-01-18 21:57   ` Marek Belisko

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=52DA6BCC.7010402@kernel.org \
    --to=jic23@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek@goldelico.com \
    --cc=mark.rutland@arm.com \
    --cc=neilb@suse.de \
    --cc=pawel.moll@arm.com \
    --cc=rob@landley.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.