Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1437184 > unrolled thread
| Started by | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| First post | 2016-07-05 18:50 +0200 |
| Last post | 2016-07-05 18:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/3] hwmon: (jc42) Add support for generic JC-42.4 devicetree binding Guenter Roeck <linux@roeck-us.net> - 2016-07-05 18:50 +0200
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2016-07-05 18:50 +0200 |
| Subject | [PATCH 2/3] hwmon: (jc42) Add support for generic JC-42.4 devicetree binding |
| Message-ID | <rRBHQ-5kY-27@gated-at.bofh.it> |
With this change, JC-42.4 compatible temperature sensors can be configured
in devicetree by providing a generic "jedec,jc-42.4-temp" binding.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/hwmon/jc42.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c
index 9887d3224a86..374630bab137 100644
--- a/drivers/hwmon/jc42.c
+++ b/drivers/hwmon/jc42.c
@@ -31,6 +31,7 @@
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/mutex.h>
+#include <linux/of.h>
/* Addresses to scan */
static const unsigned short normal_i2c[] = {
@@ -537,11 +538,20 @@ static const struct i2c_device_id jc42_id[] = {
};
MODULE_DEVICE_TABLE(i2c, jc42_id);
+#ifdef CONFIG_OF
+static const struct of_device_id jc42_of_ids[] = {
+ { .compatible = "jedec,jc-42.4-temp", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, jc42_of_ids);
+#endif
+
static struct i2c_driver jc42_driver = {
.class = I2C_CLASS_SPD,
.driver = {
.name = "jc42",
.pm = JC42_DEV_PM_OPS,
+ .of_match_table = of_match_ptr(jc42_of_ids),
},
.probe = jc42_probe,
.remove = jc42_remove,
--
2.5.0
Back to top | Article view | linux.kernel
csiph-web