← Back to team overview

kernel-packages team mailing list archive

[Bug 1452473] Re: sensors command requires manual loading of 'ibmpowernv' module

 

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 Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1452473

Title:
  sensors command requires manual loading of 'ibmpowernv' module

Status in linux package in Ubuntu:
  Triaged
Status in linux source package in Vivid:
  New

Bug description:
  == Comment: #0 - Shilpasri G. Bhat <shigbhat@xxxxxxxxxx> - 2015-05-06 12:55:40 ==
  "ibmpowernv" module is not auto loaded. This leads to failure of 'sensors' command.
  Either have 'CONFIG_SENSORS_IBMPOWERNV=y' to statically build this module or an rc script to load this during init to promote seamless operation of 'sensors' command.
   
  ---uname output---
  3.19.0-15-generic
   
  ---Steps to Reproduce---
   #sensors
  No sensors found!
  Make sure you loaded all the kernel drivers you need.
  Try sensors-detect to find out which these are.
   
  Contact Information = Shilpasri G Bhat / shilpa.bhat@xxxxxxxxxxxxxxxxxx

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1452473/+subscriptions