From: Ben Gamari <bgamari.foss@gmail.com>
To: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Cc: Ben Gamari <bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [lm-sensors] [PATCH 1/1] hwmon/adt7411: Add devicetree bindings
Date: Sun, 08 Dec 2013 19:58:38 +0000 [thread overview]
Message-ID: <1386532718-13586-2-git-send-email-bgamari.foss@gmail.com> (raw)
In-Reply-To: <1386532718-13586-1-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
There isn't reallly any configuration necessary so the bindings are
consequently quite simple.
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
---
Documentation/devicetree/bindings/hwmon/adt7411.txt | 11 +++++++++++
drivers/hwmon/adt7411.c | 8 ++++++++
2 files changed, 19 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/adt7411.txt
diff --git a/Documentation/devicetree/bindings/hwmon/adt7411.txt b/Documentation/devicetree/bindings/hwmon/adt7411.txt
new file mode 100644
index 0000000..04ec1bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/adt7411.txt
@@ -0,0 +1,11 @@
+ADT7411 (I2C)
+
+This device is a dual interface (I2C and SPI) 8-channel 10-bit ADC &
+temperature sensor. This driver currently only supports the I2C interface.
+
+Required properties:
+
+ - compatible : must be "analog,adt7411"
+ - reg : I2C bus address of the device
+ - #address-cells : must be <1>
+ - #size-cells : must be <0>
diff --git a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c
index d9299de..ece2308 100644
--- a/drivers/hwmon/adt7411.c
+++ b/drivers/hwmon/adt7411.c
@@ -334,9 +334,17 @@ static const struct i2c_device_id adt7411_id[] = {
};
MODULE_DEVICE_TABLE(i2c, adt7411_id);
+static const struct of_device_id adt7411_dt_ids[] = {
+ { .compatible = "analog,adt7411", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, adt7411_dt_ids);
+
static struct i2c_driver adt7411_driver = {
.driver = {
.name = "adt7411",
+ .owner = THIS_MODULE,
+ .of_match_table = adt7411_dt_ids,
},
.probe = adt7411_probe,
.remove = adt7411_remove,
--
1.8.3.2
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
WARNING: multiple messages have this Message-ID (diff)
From: Ben Gamari <bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Cc: Ben Gamari <bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 1/1] hwmon/adt7411: Add devicetree bindings
Date: Sun, 8 Dec 2013 14:58:38 -0500 [thread overview]
Message-ID: <1386532718-13586-2-git-send-email-bgamari.foss@gmail.com> (raw)
In-Reply-To: <1386532718-13586-1-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
There isn't reallly any configuration necessary so the bindings are
consequently quite simple.
Signed-off-by: Ben Gamari <bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
Documentation/devicetree/bindings/hwmon/adt7411.txt | 11 +++++++++++
drivers/hwmon/adt7411.c | 8 ++++++++
2 files changed, 19 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/adt7411.txt
diff --git a/Documentation/devicetree/bindings/hwmon/adt7411.txt b/Documentation/devicetree/bindings/hwmon/adt7411.txt
new file mode 100644
index 0000000..04ec1bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/adt7411.txt
@@ -0,0 +1,11 @@
+ADT7411 (I2C)
+
+This device is a dual interface (I2C and SPI) 8-channel 10-bit ADC &
+temperature sensor. This driver currently only supports the I2C interface.
+
+Required properties:
+
+ - compatible : must be "analog,adt7411"
+ - reg : I2C bus address of the device
+ - #address-cells : must be <1>
+ - #size-cells : must be <0>
diff --git a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c
index d9299de..ece2308 100644
--- a/drivers/hwmon/adt7411.c
+++ b/drivers/hwmon/adt7411.c
@@ -334,9 +334,17 @@ static const struct i2c_device_id adt7411_id[] = {
};
MODULE_DEVICE_TABLE(i2c, adt7411_id);
+static const struct of_device_id adt7411_dt_ids[] = {
+ { .compatible = "analog,adt7411", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, adt7411_dt_ids);
+
static struct i2c_driver adt7411_driver = {
.driver = {
.name = "adt7411",
+ .owner = THIS_MODULE,
+ .of_match_table = adt7411_dt_ids,
},
.probe = adt7411_probe,
.remove = adt7411_remove,
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-12-08 19:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-08 19:58 [lm-sensors] Add devicetree bindings for ADT7411 driver Ben Gamari
2013-12-08 19:58 ` Ben Gamari
[not found] ` <1386532718-13586-1-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-12-08 19:58 ` Ben Gamari [this message]
2013-12-08 19:58 ` [PATCH 1/1] hwmon/adt7411: Add devicetree bindings Ben Gamari
[not found] ` <1386532718-13586-2-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-12-08 20:32 ` [lm-sensors] " Guenter Roeck
2013-12-08 20:32 ` Guenter Roeck
[not found] ` <52A4D74F.7010701-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-12-08 20:53 ` Ben Gamari
2013-12-08 20:53 ` Ben Gamari
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=1386532718-13586-2-git-send-email-bgamari.foss@gmail.com \
--to=bgamari.foss@gmail.com \
--cc=bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.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.