All of lore.kernel.org
 help / color / mirror / Atom feed
From: Afonso Bordado <afonsobordado@az8.co>
To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: [PATCH v4 2/5] iio: gyro: add device tree support for fxas21002c
Date: Tue, 11 Sep 2018 16:00:08 +0100	[thread overview]
Message-ID: <20180911150011.31964-2-afonsobordado@az8.co> (raw)
In-Reply-To: <20180911150011.31964-1-afonsobordado@az8.co>

This patch adds device tree support for the fxas21002c driver.

Signed-off-by: Afonso Bordado <afonsobordado@az8.co>
---
 drivers/iio/gyro/fxas21002c.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/gyro/fxas21002c.c b/drivers/iio/gyro/fxas21002c.c
index 649316c26f5b..e2ce0622944b 100644
--- a/drivers/iio/gyro/fxas21002c.c
+++ b/drivers/iio/gyro/fxas21002c.c
@@ -8,7 +8,6 @@
  * Datasheet: https://www.nxp.com/docs/en/data-sheet/FXAS21002.pdf
  * TODO:
  *        ODR / Scale Support
- *        Devicetree
  *        Scale Boost Mode
  *        Power management
  *        GPIO Reset
@@ -357,6 +356,12 @@ static int fxas21002c_probe(struct i2c_client *client,
 	return ret;
 }
 
+static const struct of_device_id fxas21002c_of_ids[] = {
+	{.compatible = "fsl,fxas21002c"},
+	{}
+};
+MODULE_DEVICE_TABLE(of, fxas21002c_of_ids);
+
 static const struct i2c_device_id fxas21002c_id[] = {
 	{"fxas21002c", ID_FXAS21002C},
 	{}
@@ -366,6 +371,7 @@ MODULE_DEVICE_TABLE(i2c, fxas21002c_id);
 static struct i2c_driver fxas21002c_driver = {
 	.driver = {
 		.name = FXAS21002C_DRV_NAME,
+		.of_match_table = fxas21002c_of_ids,
 	},
 	.probe		= fxas21002c_probe,
 	.id_table	= fxas21002c_id,
-- 
2.18.0



  reply	other threads:[~2018-09-11 15:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 15:00 [PATCH v4 1/5] iio: gyro: add support for fxas21002c Afonso Bordado
2018-09-11 15:00 ` Afonso Bordado [this message]
2018-09-11 15:00 ` [PATCH v4 3/5] dt-bindings: fxas21002c: Document the fxas21002c I2C bindings Afonso Bordado
2018-09-16 12:59   ` Jonathan Cameron
2018-09-16 13:01   ` Jonathan Cameron
2018-09-11 15:00 ` [PATCH v4 4/5] iio: fxas21002c: add ODR/Scale support Afonso Bordado
2018-09-12  9:26   ` kbuild test robot
2018-09-12 18:23     ` Himanshu Jha
2018-09-14 15:26       ` Afonso Bordado
2018-09-14 17:30         ` Himanshu Jha
2018-09-16 11:50           ` Jonathan Cameron
2018-09-11 15:00 ` [PATCH v4 5/5] MAINTAINERS: add entry for fxas21002c gyro driver Afonso Bordado
2018-09-11 16:17 ` [PATCH v4 1/5] iio: gyro: add support for fxas21002c Song Qiang
2018-09-16 11:57 ` 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=20180911150011.31964-2-afonsobordado@az8.co \
    --to=afonsobordado@az8.co \
    --cc=devicetree@vger.kernel.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 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.