From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net-next 2/2] net: airoha: npu: Add 7583 SoC support
Date: Fri, 26 Sep 2025 18:01:47 +0200 [thread overview]
Message-ID: <aNa464zcFCvNhL33@lore-desk> (raw)
In-Reply-To: <82a08bb5-cbc3-4bba-abad-393092d66557@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 923 bytes --]
> > - 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-09-26 16:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 15:43 [PATCH net-next 0/2] net: airoha: npu: Introduce support for Airoha 7583 NPU Lorenzo Bianconi
2025-09-26 15:43 ` [PATCH net-next 1/2] dt-bindings: net: airoha: npu: Add AN7583 support Lorenzo Bianconi
2025-09-26 15:43 ` [PATCH net-next 2/2] net: airoha: npu: Add 7583 SoC support Lorenzo Bianconi
2025-09-26 15:54 ` Andrew Lunn
2025-09-26 16:01 ` Lorenzo Bianconi [this message]
2025-09-26 16:10 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aNa464zcFCvNhL33@lore-desk \
--to=lorenzo@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox