[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aNa464zcFCvNhL33@lore-desk>
Date: Fri, 26 Sep 2025 18:01:47 +0200
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net-next 2/2] net: airoha: npu: Add 7583 SoC support
> > - 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
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists