This also exists upstream.
Looks like the modalias that gets generated is:
$ cat /lib/modules/`uname -r`/modules.alias | grep ibmpowernv
alias platform:opal-sensor ibmpowernv
Where OF creates this for the device:
$ cat /sys/devices/platform/opal-sensor/modalias
of:NsensorsT<NULL>
If I make the module use the OF string it still doesn't seem to work.
Patch below:
diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c
index 4255514..c872818 100644
--- a/drivers/hwmon/ibmpowernv.c
+++ b/drivers/hwmon/ibmpowernv.c
@@ -466,19 +466,17 @@ static int ibmpowernv_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(hwmon_dev);
}
-static const struct platform_device_id opal_sensor_driver_ids[] = {
- {
- .name = "opal-sensor",
- },
- { }
+static const struct of_device_id opal_sensor_match[] = {
+ { .compatible = "sensors",},
+ {},
};
-MODULE_DEVICE_TABLE(platform, opal_sensor_driver_ids);
+MODULE_DEVICE_TABLE(of, opal_sensor_match);
static struct platform_driver ibmpowernv_driver = {
.probe = ibmpowernv_probe,
- .id_table = opal_sensor_driver_ids,
.driver = {
.name = DRVNAME,
+ .of_match_table = opal_sensor_match,
},
};
Any suggestions?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1452473
Title:
sensors command requires manual loading of 'ibmpowernv' module
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1452473/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs