linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Siddharth Manthan <siddharth.manthan@gmail.com>
To: jic23@kernel.org
Cc: robh+dt@kernel.org, nikita@trvn.ru, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	ktsai@capellamicro.com, lars@metafoo.de,
	Siddharth Manthan <siddharth.manthan@gmail.com>
Subject: [PATCH 2/2] drivers: iio: light: cm3323: Add device tree support
Date: Wed, 28 Jul 2021 16:30:48 +0530	[thread overview]
Message-ID: <20210728110048.14593-2-siddharth.manthan@gmail.com> (raw)
In-Reply-To: <20210728110048.14593-1-siddharth.manthan@gmail.com>

Add Device Tree support for Capella cm3323 Ambient Light Sensor

Signed-off-by: Siddharth Manthan <siddharth.manthan@gmail.com>
---
 drivers/iio/light/cm3323.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/iio/light/cm3323.c b/drivers/iio/light/cm3323.c
index 6d1b0ffd144b..fd9a8c27de2e 100644
--- a/drivers/iio/light/cm3323.c
+++ b/drivers/iio/light/cm3323.c
@@ -256,9 +256,16 @@ static const struct i2c_device_id cm3323_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, cm3323_id);
 
+static const struct of_device_id cm3323_of_match[] = {
+	{ .compatible = "capella,cm3323", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, cm3323_of_match);
+
 static struct i2c_driver cm3323_driver = {
 	.driver = {
 		.name = CM3323_DRV_NAME,
+		.of_match_table = cm3323_of_match,
 	},
 	.probe		= cm3323_probe,
 	.id_table	= cm3323_id,
-- 
2.31.1


  reply	other threads:[~2021-07-28 16:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 11:00 [PATCH 1/2] dt-bindings: Add bindings for Capella cm3323 Ambient Light Sensor Siddharth Manthan
2021-07-28 11:00 ` Siddharth Manthan [this message]
2021-08-02 21:34 ` Rob Herring
2021-08-08 14:28   ` Jonathan Cameron
     [not found] <20210728122216.22849-1-siddharth_manthan@outlook.com>
     [not found] ` <SG2PR02MB38141E2560616F0514CF9A768FEA9@SG2PR02MB3814.apcprd02.prod.outlook.com>
2021-07-28 17:56   ` [PATCH 2/2] drivers: iio: light: cm3323: Add device tree support 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=20210728110048.14593-2-siddharth.manthan@gmail.com \
    --to=siddharth.manthan@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=ktsai@capellamicro.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita@trvn.ru \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH 2/2] drivers: iio: light: cm3323: Add device tree support' \
    /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

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).