From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0735C4332F for ; Mon, 3 Jan 2022 06:03:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231564AbiACGDh (ORCPT ); Mon, 3 Jan 2022 01:03:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbiACGDg (ORCPT ); Mon, 3 Jan 2022 01:03:36 -0500 Received: from mail.marcansoft.com (marcansoft.com [IPv6:2a01:298:fe:f::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C841EC061761; Sun, 2 Jan 2022 22:03:35 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id A8608424D0; Mon, 3 Jan 2022 06:03:24 +0000 (UTC) Message-ID: Date: Mon, 3 Jan 2022 15:03:22 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH 16/34] brcmfmac: acpi: Add support for fetching Apple ACPI properties Content-Language: en-US To: Linus Walleij Cc: Kalle Valo , "David S. Miller" , Jakub Kicinski , Rob Herring , "Rafael J. Wysocki" , Len Brown , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Chung-hsien Hsu , Sven Peter , Alyssa Rosenzweig , Mark Kettenis , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Pieter-Paul Giesberts , Hans de Goede , "John W. Linville" , "Daniel (Deognyoun) Kim" , "brian m. carlson" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com References: <20211226153624.162281-1-marcan@marcan.st> <20211226153624.162281-17-marcan@marcan.st> From: Hector Martin In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2022/01/02 14:58, Linus Walleij wrote: > On Sun, Dec 26, 2021 at 4:38 PM Hector Martin 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 > > If the strings treated here are exactly the same as for the device tree, > you should be able to just use "devprops" (firmware node) to handle it > abstractly, and then the respective DT and ACPI backend will provide > the properties. > > I don't know if this patch I made recently is enough of an examples: > https://lore.kernel.org/linux-hwmon/20211206020423.62402-2-linus.walleij@linaro.org/ > > If the ACPI and DT differs a lot in format and strings etc it may not > be worth it. It's not quite the same; module-instance is the same from macOS' perspective, but we don't use Apple's device tree directly but rather roll our own DT which uses a different property name in this case. antenna-sku-info uses an ACPI method on x86, so that one is completely different. So in the end nothing is actually shared. -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub