Linux Input/HID development
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	Olof Johansson <olof@lixom.net>
Subject: [PATCH] Input: mpu3050: add of_match table for device-tree probing
Date: Thu, 22 Dec 2011 18:39:52 -0800	[thread overview]
Message-ID: <1324607992-2919-1-git-send-email-olof@lixom.net> (raw)

Adding invn,mpu3050 as the initial id.

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 drivers/input/misc/mpu3050.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/input/misc/mpu3050.c b/drivers/input/misc/mpu3050.c
index f71dc72..e9a57e3 100644
--- a/drivers/input/misc/mpu3050.c
+++ b/drivers/input/misc/mpu3050.c
@@ -348,11 +348,18 @@ static const struct i2c_device_id mpu3050_ids[] = {
 };
 MODULE_DEVICE_TABLE(i2c, mpu3050_ids);
 
+static const struct of_device_id mpu3050_of_match[] = {
+	{ .compatible = "invn,mpu3050", },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, mpu3050_of_match);
+
 static struct i2c_driver mpu3050_i2c_driver = {
 	.driver	= {
 		.name	= "mpu3050",
 		.owner	= THIS_MODULE,
 		.pm	= &mpu3050_pm,
+		.of_match_table = mpu3050_of_match,
 	},
 	.probe		= mpu3050_probe,
 	.remove		= __devexit_p(mpu3050_remove),
-- 
1.7.8.GIT


             reply	other threads:[~2011-12-23  2:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-23  2:39 Olof Johansson [this message]
     [not found] ` <1324607992-2919-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-12-23  9:22   ` [PATCH] Input: mpu3050: add of_match table for device-tree probing Dmitry Torokhov
2011-12-23 15:58     ` Olof Johansson
2011-12-27 16:07       ` Rob Herring
2011-12-27 17:14         ` Olof Johansson
2012-01-02  8:42           ` Grant Likely

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=1324607992-2919-1-git-send-email-olof@lixom.net \
    --to=olof@lixom.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.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