Add devicetree bindings for ADT7411 driver
Subsystems (2)
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1386532718-13586-1-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/1 hwmon/adt7411: Add devicetree bindings
There isn't reallly any configuration necessary so the bindings are consequently quite simple.
--- 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
Documentation/devicetree/bindings/hwmon/adt7411.txt new file +11 -0
@@ -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>
drivers/hwmon/adt7411.c +8 -0
@@ -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,
Signature · 6 lines
1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1386532718-13586-2-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [lm-sensors] [PATCH 1/1] hwmon/adt7411: Add devicetree bindings
Quoted 5 lines · Ben Gamari
There isn't reallly any configuration necessary so the bindings are consequently quite simple.
Signed-off-by Ben Gamari <[email protected]>---
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [lm-sensors] [PATCH 1/1] hwmon/adt7411: Add devicetree bindings
Quoted 11 lines · Guenter Roeck
Quoted 5 lines · Ben Gamari
There isn't reallly any configuration necessary so the bindings are consequently quite simple.
Signed-off-by Ben Gamari <[email protected]>---
i2c devices don't require explicit bindings unless driver specific bindings are needed. Please see
Documentation/devicetree/bindings/i2c/trivial-devices.txtfor 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