On 2016-03-29 05:25, Arnd Bergmann wrote:
On Monday 28 March 2016 09:35:22 Sinan Kaya wrote:The code is using the compatible DT string to associate a reset driver withthe actual device itself. The compatible string does not exist on ACPIbased systems. HID is the unique identifier for a device driver instead. The change allows a driver to register with DT compatible string or ACPIHID and then match the object with one of these conditions.Rules for loading the reset driver are as follow: - ACPI HID needs match for ACPI systems - DT compat needs to match for OF systems Tested-by: Eric Auger <[email protected]> (device tree only) Tested-by: Shanker Donthineni <[email protected]> (ACPI only) Signed-off-by: Sinan Kaya <[email protected]>This really feels wrong for two reasons: * device assignment of non-PCI devices is really special and doesn'tseem to make sense on general purpose servers that would be the targetfor ACPI normally
Why is it special? Acpi is not equal to pci. Platform devices are first class devices too. Especially, _cls was introduced for this reason.
* If there is indeed a requirement for ACPI to handle something like this, it should be part of the ACPI spec, with a well-defined method of handlingreset, rather than having to add a device specific hack for each device separately.
I see. Normally, this is done by calling _rst method. AFAIK, Linux doesn’t support _rst. I can check its presence and call it if it is there.
Arnd

