[Skiboot] [PATCH] sensor: add a compatible property

Cédric Le Goater clg at fr.ibm.com
Thu Oct 1 00:56:25 AEST 2015


On 09/30/2015 01:53 PM, Stewart Smith wrote:
> Cédric Le Goater <clg at fr.ibm.com> writes:
>> OPAL needs an extra compatible property "ibm,opal-sensor" to make
>> module autoload work smoothly in Linux for ibmpowernv driver.
> 
> in hw/dts.c we add ibm,opal-sensor - why isn't that sufficient?

Unfortunately not. The kernel routine opal_sensor_init() initializes 
the platform device using the node "/ibm,opal/sensors" under which
an "ibm,opal-sensor" compatible property is expected. So this property
is a must have but you also need to modify the driver for autoload 
to work [1].

In fine, the "ibm,opal-sensor" compatible property under each sensor 
node is not that useful. It is used by the driver to discriminate 
valid sensor nodes. The sensor-type property has the same use but
we need both to keep compatibility between OPAL and kernel.

Ideally, the next step should be to add in opal_init() a couple of
calls to opal_pdev_init() and one specially for sensors :

	opal_pdev_init(opal_node, "ibm,opal-sensor");


In terms of compatibility, this patch does not break current kernels. 
ibmpowernv still loads manually. And the kernel patch [1] below has 
no effect on the loading unless with it used with this OPAL patch, 
in which case, autoload works.

This is clearly not a high priority change. Autoload has been broken
since the beginning. 

Do you want an updated changelog with the above ?

Thanks,

C.


[1] https://github.com/legoater/linux/commit/a691ba1c7877ab96d6660810e383cecdfb4cc347

    Sent to the sensor mailing but it seems that the list archives 
    are broken since beginning of September.



More information about the Skiboot mailing list