Merge tag 'hsi-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
[deliverable/linux.git] / drivers / hwmon / jc42.c
index f67c1bbe2c510e8d979b721b63051f79c18e6e2c..9d5f85f3384fae0f0dd44e1d34035780dcd858b4 100644 (file)
@@ -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[] = {
@@ -541,11 +542,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,
+       .class          = I2C_CLASS_SPD | I2C_CLASS_HWMON,
        .driver = {
                .name   = "jc42",
                .pm = JC42_DEV_PM_OPS,
+               .of_match_table = of_match_ptr(jc42_of_ids),
        },
        .probe          = jc42_probe,
        .remove         = jc42_remove,
This page took 0.027744 seconds and 5 git commands to generate.