mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chunfeng Yun (云春峰)" <Chunfeng.Yun@mediatek.com>
To: "konrad.dybcio@oss.qualcomm.com" <konrad.dybcio@oss.qualcomm.com>,
	"sven@kernel.org" <sven@kernel.org>,
	"westeri@kernel.org" <westeri@kernel.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"YehezkelShB@gmail.com" <YehezkelShB@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"andreas.noever@gmail.com" <andreas.noever@gmail.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH 1/4] thunderbolt: add platform nhi driver
Date: Wed, 11 Nov 2026 13:09:15 +0000	[thread overview]
Message-ID: <9a604d06738e13250413a844e2af2c6895162068.camel@mediatek.com> (raw)
In-Reply-To: <179407827117.165429.11777170722243752189.b4-review@b4>

On 六, 2026-11-07 at 20:04 +0100, Sven Peter wrote:
> > Add a new file plat.c to register platform NHI driver for MediaTek
> > mt8901/mt8992 SoCs.
> > 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > 
> 
> [...]
> 
> > +
> > +static void nhi_plat_shutdown(struct platform_device *pdev)
> > +{
> > +	nhi_plat_do_remove(pdev, true);
> > +}
> > +
> > +
> > +#ifdef CONFIG_OF
> > +static const struct of_device_id nhi_plat_of_match[] = {
> > +	{ .compatible = "thunderbolt-platform" },
> 
> Do you already have hardware that probes via device tree? You'll have
> to
> write bindings and get them reviewed before adding any compatible
> here.
> Generic ones like you used here aren't usually allowed.
> 
> If you don't have a dts based platform I'd probably drop this, 
Make sense, currently we only use this driver on ACPI-base platforms
where the vendor-specific power/clock/phy sequencing is abstracted by
firmware (the dedicated wakeup irq may be vendor-specific due to not
defined in spec), and we don't have a DT-based platform exercising this
yet.

I will drop the OF match table in the next version and keep it focuesd
on ACPI for now.

> not much of
> this code here is e.g. re-usable for Apple since they like to think
> very
> different, see my series in [1] that I can pick up again now that we
> made progress on how to represent connections between the NHI and the
> protocol adapters.
Yes, I already looked through your series when prepare these patches,
thanks

> 
> Not sure about qualcom since I haven't seen a series for the NHI yet
> but
> I'm sure Konrad can comment there. I kinda expect that it won't have
> much shared code either.
> 
> Take a look at e.g. more recent drivers in drivers/usb/dwc3: They
> usually add a dwc3-$vendor.c file that takes care of all the
> vendor-specific quirks and that ends up being nicer than a single
> platform.c file with tons of quirks and separate code paths for each
> and
> every vendor.
> 
> 
> Sven
> 
> 
> [1]
> https://lore.kernel.org/asahi/20260906-b4-apple-soc-tbt-v2-0-1f80085f93fb@kernel.org/
>  
> 


  parent reply	other threads:[~2026-11-11 13:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30  8:25 [PATCH 0/4] add support " Chunfeng Yun
2026-10-30  8:25 ` [PATCH 1/4] thunderbolt: add " Chunfeng Yun
2026-10-30  8:47   ` Mika Westerberg
2026-11-04  7:34     ` Chunfeng Yun (云春峰)
2026-11-04  7:48       ` mika.westerberg
2026-11-05  9:13         ` Chunfeng Yun (云春峰)
2026-10-31  3:41   ` kernel test robot
2026-10-31 20:03   ` kernel test robot
2026-11-07 19:04   ` Sven Peter
2026-11-09 13:56     ` Konrad Dybcio
2026-11-09 17:35       ` Sven Peter
2026-11-11 13:25       ` Chunfeng Yun (云春峰)
2026-11-11 13:09     ` Chunfeng Yun (云春峰) [this message]
2026-10-30  8:25 ` [PATCH 2/4] thunderbolt: add support optional dedicated wakeup irq Chunfeng Yun
2026-10-30  8:48   ` Mika Westerberg
2026-11-03  9:05     ` Chunfeng Yun (云春峰)
2026-11-03 11:59       ` mika.westerberg
2026-11-04  7:05         ` Chunfeng Yun (云春峰)
2026-10-30  8:25 ` [PATCH 3/4] thunderbolt: improve usb3 adapter link up timeout value Chunfeng Yun
2026-10-30  8:50   ` Mika Westerberg
2026-11-03  8:13     ` Chunfeng Yun (云春峰)
2026-10-30  8:25 ` [PATCH 4/4] thunderbolt: prevent pcie tunnel activation/teardown warnings Chunfeng Yun
2026-10-30  8:56   ` Mika Westerberg
2026-11-03  8:33     ` Chunfeng Yun (云春峰)
2026-11-03 12:48       ` mika.westerberg
2026-11-04  7:09         ` Chunfeng Yun (云春峰)
2026-11-04  8:08           ` mika.westerberg
2026-11-11  2:16             ` Chunfeng Yun (云春峰)

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=9a604d06738e13250413a844e2af2c6895162068.camel@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=sven@kernel.org \
    --cc=westeri@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

all inboxes | Powered by JetHome®