Re: [PATCH 16/34] brcmfmac: acpi: Add support for fetching Apple ACPI properties

From: Kalle Valo
Date: Mon Jan 10 2022 - 05:00:00 EST


Andy Shevchenko <andy.shevchenko@xxxxxxxxx> writes:

> On Sunday, December 26, 2021, Hector Martin <marcan@xxxxxxxxx> wrote:
>
> On DT platforms, the module-instance and antenna-sku-info properties
> are passed in the DT. On ACPI platforms, module-instance is passed via
> the analogous Apple device property mechanism, while the antenna SKU
> info is instead obtained via an ACPI method that grabs it from
> non-volatile storage.
>
> Add support for this, to allow proper firmware selection on Apple
> platforms.
>
> Signed-off-by: Hector Martin <marcan@xxxxxxxxx>
> ---
> .../broadcom/brcm80211/brcmfmac/Makefile | 2 +
> .../broadcom/brcm80211/brcmfmac/acpi.c | 51 +++++++++++++++++++
> .../broadcom/brcm80211/brcmfmac/common.c | 1 +
> .../broadcom/brcm80211/brcmfmac/common.h | 9 ++++
> 4 files changed, 63 insertions(+)
> create mode 100644 drivers/net/wireless/broadcom/brcm80211/brcmfmac/acpi.c
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
> index 13c13504a6e8..19009eb9db93 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
> @@ -47,3 +47,5 @@ brcmfmac-$(CONFIG_OF) += \
> of.o
> brcmfmac-$(CONFIG_DMI) += \
> dmi.o
> +brcmfmac-$(CONFIG_ACPI) += \
> + acpi.o
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/acpi.c
> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/acpi.c
> new file mode 100644
> index 000000000000..3e56dc7a8db2
> --- /dev/null
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/acpi.c
> @@ -0,0 +1,51 @@
> +// SPDX-License-Identifier: ISC
> +/*
> + * Copyright The Asahi Linux Contributors
> + */
> +
> +#include <linux/acpi.h>
> +#include "debug.h"
> +#include "core.h"
> +#include "common.h"
> +
> +void brcmf_acpi_probe(struct device *dev, enum brcmf_bus_type bus_type,
> + struct brcmf_mp_device *settings)
> +{
> + acpi_status status;
> + struct acpi_device *adev = ACPI_COMPANION(dev);
>
> Please, move the assignment closer to its first user

Andy, your email was formatted in HTML. I'm sure you know this already,
but our mailing lists drop all HTML emails so other people (and
patchwork) don't see your comments.

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches