Hans de Goede e168159934 ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources
acpi_lpss_create_device() skips handling LPSS devices which do not have
a mmio resources in their resource list (typically these devices are
disabled by the firmware). But since the LPSS code does not bind to the
device, acpi_bus_attach() ends up still creating a platform device for
it and the regular platform_driver for the ACPI HID still tries to bind
to it.

This happens e.g. on some boards which do not use the pwm-controller
and have an empty or invalid resource-table for it. Currently this causes
these error messages to get logged:

[    3.281966] pwm-lpss 80862288:00: invalid resource
[    3.287098] pwm-lpss: probe of 80862288:00 failed with error -22

This commit stops the undesirable creation of a platform_device for
disabled LPSS devices by setting pnp.type.platform_id to 0. Note that
acpi_scan_attach_handler() also sets pnp.type.platform_id to 0 when there
is a matching handler for the device and that handler has no attach
callback, so we simply behave as a handler without an attach function
in this case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-15 17:45:25 +01:00
..
2017-11-13 01:36:58 +01:00
2017-11-13 20:08:22 -08:00
2017-11-15 10:56:56 -08:00
2017-11-17 09:51:57 -08:00
2017-11-16 09:15:57 -08:00
2017-11-09 00:55:16 +01:00
2016-04-27 23:42:57 +02:00
2016-01-04 22:10:30 +01:00
2017-08-24 03:38:25 +02:00
2017-11-15 13:46:33 -08:00
2017-11-13 01:41:26 +01:00
2017-11-30 13:37:29 +01:00
2016-10-10 02:20:43 +02:00
2017-05-09 15:15:47 -07:00
2017-11-30 13:37:29 +01:00
2017-11-16 09:15:57 -08:00
2017-11-16 09:15:57 -08:00
2017-11-30 13:37:29 +01:00
2017-11-15 13:46:33 -08:00