public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Lorenzo Bianconi <lorenzo@kernel.org>
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:10:28 +0200	[thread overview]
Message-ID: <b5ff2e06-df4f-423a-86ac-fb025b243844@lunn.ch> (raw)
In-Reply-To: <aNa464zcFCvNhL33@lore-desk>

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


      reply	other threads:[~2025-09-26 16:10 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
2025-09-26 16:10       ` Andrew Lunn [this message]

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=b5ff2e06-df4f-423a-86ac-fb025b243844@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@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=lorenzo@kernel.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