[PATCH net-next 2/2] net: airoha: npu: Add 7583 SoC support
Lorenzo Bianconi
lorenzo at kernel.org
Fri Sep 26 09:01:47 PDT 2025
> > - ret = request_firmware(&fw, NPU_EN7581_FIRMWARE_DATA, dev);
> > + if (of_device_is_compatible(dev->of_node, "airoha,an7583-npu"))
> > + fw_name = NPU_AN7583_FIRMWARE_DATA;
> > + else
> > + fw_name = NPU_EN7581_FIRMWARE_DATA;
> > + ret = request_firmware(&fw, fw_name, dev);
> > if (ret)
> > return ret == -ENOENT ? -EPROBE_DEFER : ret;
> >
> > @@ -612,6 +623,7 @@ EXPORT_SYMBOL_GPL(airoha_npu_put);
> >
> > static const struct of_device_id of_airoha_npu_match[] = {
> > { .compatible = "airoha,en7581-npu" },
> > + { .compatible = "airoha,an7583-npu" },
>
> It would be more normal to make use of the void * in of_device_id to
> have per compatible data, such are firmware name.
>
> Andrew
ack, I implemted this way since we have 2 fw names but we can have a struct
pointed by of_device_id driver_data pointer to contains both of them.
What do you think?
Regards,
Lorenzo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20250926/8cf6e2c4/attachment-0001.sig>
More information about the Linux-mediatek
mailing list