[PATCH net-next 2/2] net: airoha: npu: Add 7583 SoC support
Andrew Lunn
andrew at lunn.ch
Fri Sep 26 09:10:28 PDT 2025
On Fri, Sep 26, 2025 at 06:01:47PM +0200, Lorenzo Bianconi wrote:
> > > - 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?
That would work.
Andrew
More information about the linux-arm-kernel
mailing list