* Add devicetree bindings for ADT7411 driver
@ 2013-12-08 19:58 Ben Gamari
[not found] ` <1386532718-13586-1-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Ben Gamari @ 2013-12-08 19:58 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA
This adds devicetree bindings for the ADT7411 which I've had use for in a
personal project. Unfortunately I haven't yet been to able test against real
hardware, but I think the patch itself is pretty straightforward.
Cheers,
- Ben
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] hwmon/adt7411: Add devicetree bindings
[not found] ` <1386532718-13586-1-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-12-08 19:58 ` Ben Gamari
[not found] ` <1386532718-13586-2-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Ben Gamari @ 2013-12-08 19:58 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA
Cc: Ben Gamari
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [lm-sensors] [PATCH 1/1] hwmon/adt7411: Add devicetree bindings
[not found] ` <1386532718-13586-2-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-12-08 20:32 ` Guenter Roeck
[not found] ` <52A4D74F.7010701-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2013-12-08 20:32 UTC (permalink / raw)
To: Ben Gamari, devicetree-u79uwXL29TY76Z2rM5mHXA,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA
On 12/08/2013 11:58 AM, Ben Gamari wrote:
> 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>
> ---
i2c devices don't require explicit bindings unless driver specific bindings are needed.
Please see Documentation/devicetree/bindings/i2c/trivial-devices.txt for details.
You might want to consider adding the device into the trivial-devices.txt file instead.
Guenter
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lm-sensors] [PATCH 1/1] hwmon/adt7411: Add devicetree bindings
[not found] ` <52A4D74F.7010701-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
@ 2013-12-08 20:53 ` Ben Gamari
0 siblings, 0 replies; 4+ messages in thread
From: Ben Gamari @ 2013-12-08 20:53 UTC (permalink / raw)
To: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
lm-sensors-GZX6beZjE8VD60Wz+7aTrA
[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]
Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> writes:
> On 12/08/2013 11:58 AM, Ben Gamari wrote:
>> 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>
>> ---
>
> i2c devices don't require explicit bindings unless driver specific bindings are needed.
> Please see Documentation/devicetree/bindings/i2c/trivial-devices.txt for details.
> You might want to consider adding the device into the trivial-devices.txt file instead.
>
Thanks! I was not aware of this. Patch coming.
How does the devicetree code handle the vendor prefix in the compatible
field? For instance, the AD7414 has compatible="ad,ad7414" yet the
driver never mentions "ad", only "ad7414". Is the vendor prefix stripped
off while searching for compatible drivers?
On that note, it seems that adt7461 is listed twice in this file; once
as "adi,adt7461" and again as "adt7461". Is this expected?
Thanks again.
Cheers,
- Ben
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-08 20:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-08 19:58 Add devicetree bindings for ADT7411 driver Ben Gamari
[not found] ` <1386532718-13586-1-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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
[not found] ` <52A4D74F.7010701-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-12-08 20:53 ` Ben Gamari
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).