mbox series

[v4,0/5] ACPI: platform: Fix SMB0001 enumeration on Kontron devices

Message ID 20230703121411.69606-1-andriy.shevchenko@linux.intel.com
Headers show
Series ACPI: platform: Fix SMB0001 enumeration on Kontron devices | expand

Message

Andy Shevchenko July 3, 2023, 12:14 p.m. UTC
After switching i2c-scmi driver to be a plaform one, it stopped
being enumerated on number of Kontron platforms, because it's
listed in the forbidden_id_list.

To resolve the situation, add a flag and check if there are resources
privided for the forbiden device. If it is the case, the device must
be skipped.

Changelog v4:
- dropped applied patch
- added kernel doc for new helper (Rafael)
- rewritten the commit message for the reason of a new helper (Rafael)
- added a couple of patches for ACPI scan.c that can be applied later on

Changelog v3:
- provided completely rewritten solution (Rafael)
- due to above, added two new patches
- due to above, dropped tags from patch 3

Andy Shevchenko (5):
  ACPI: bus: Introduce acpi_match_acpi_device() helper
  ACPI: platform: Ignore SMB0001 only when it has resources
  ACPI: platform: Move SMB0001 HID to the header and reuse
  ACPI: scan: Use the acpi_match_acpi_device() helper
  ACPI: scan: Provide symbol declarations

 drivers/acpi/acpi_platform.c  | 30 +++++++++++++++++++++++++++---
 drivers/acpi/bus.c            | 25 +++++++++++++++++++++----
 drivers/acpi/scan.c           | 22 +++++++++++++---------
 drivers/i2c/busses/i2c-scmi.c |  3 ---
 include/acpi/acpi_drivers.h   |  2 ++
 include/linux/acpi.h          |  9 +++++++++
 6 files changed, 72 insertions(+), 19 deletions(-)

Comments

Rafael J. Wysocki July 4, 2023, 5:21 p.m. UTC | #1
On Mon, Jul 3, 2023 at 2:14 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Compiler is not happy about a couple of symbols that, it thinks,
> are not declared:
>
>   warning: symbol 'acpi_device_lock' was not declared. Should it be static?
>   warning: symbol 'acpi_wakeup_device_list' was not declared. Should it be static?
>
> Include "sleep.h" to have them explicitly declared and make
> the compiler happy.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

I've just applied a patch from Ben Dooks making the exact same change.

> ---
>  drivers/acpi/scan.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index ec1c9bec8bae..5b145f1aaa1b 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -23,6 +23,7 @@
>  #include <linux/dma-direct.h>
>
>  #include "internal.h"
> +#include "sleep.h"
>
>  #define ACPI_BUS_CLASS                 "system_bus"
>  #define ACPI_BUS_HID                   "LNXSYBUS"
> --