Thread (117 messages) 117 messages, 5 authors, 2022-01-31

Re: [PATCH v2 08/35] brcmfmac: of: Fetch Apple properties

From: Andy Shevchenko <hidden>
Date: 2022-01-04 11:19:11
Also in: linux-acpi, linux-devicetree, linux-wireless, lkml

On Tue, Jan 4, 2022 at 9:28 AM Hector Martin [off-list ref] wrote:
On Apple ARM64 platforms, firmware selection requires two properties
that come from system firmware: the module-instance (aka "island", a
codename representing a given hardware platform) and the antenna-sku.
We map Apple's module codenames to board_types in the form
"apple,<module-instance>".

The mapped board_type is added to the DTS file in that form, while the
antenna-sku is forwarded by our bootloader from the Apple Device Tree
into the FDT. Grab them from the DT so firmware selection can use
them.
+       /* Apple ARM64 platforms have their own idea of board type, passed in
+        * via the device tree. They also have an antenna SKU parameter
+        */
+       if (!of_property_read_string(np, "brcm,board-type", &prop))
+               settings->board_type = devm_kstrdup(dev, prop, GFP_KERNEL);
+
+       if (!of_property_read_string(np, "apple,antenna-sku", &prop))
+               settings->antenna_sku = devm_kstrdup(dev, prop, GFP_KERNEL);
No error checks?
But hold on, why do you need to copy them? Are you expecting this to be in DTO?

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help