Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Joshua Peisach" <jpeisach@ubuntu.com>
To: "Sven Peter" <sven@kernel.org>, "Joshua Peisach" <jpeisach@ubuntu.com>
Cc: <asahi@lists.linux.dev>, "Philipp Zabel" <p.zabel@pengutronix.de>,
	"Rob Herring" <robh@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	"Neal Gompa" <neal@gompa.dev>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, "Janne Grunau" <j@jannau.net>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>
Subject: Re: [PATCH 2/3] reset: Add Apple SoC CIO reset driver
Date: Sun, 09 Aug 2026 13:13:18 -0400	[thread overview]
Message-ID: <DKKKXXEMIO2G.LN1EYSEBL8CD@ubuntu.com> (raw)
In-Reply-To: <7a170485-b349-4502-adb1-3ce6217bc435@kernel.org>

On Sun Aug 9, 2026 at 11:20 AM EDT, Sven Peter wrote:
> On 09.08.26 16:30, Joshua Peisach wrote:
>> On Sun Aug 9, 2026 at 8:16 AM EDT, Sven Peter wrote:
>>> Add a driver for the reset of the CIO (USB4/Thunderbolt) blocks on
>>> Apple Silicon SoCs which has to be deasserted before their
>>> co-processor can be booted. On t8103 each port comes with a dedicated
>>> register page while t600x uses a single register with one request bit
>>> per port shared by all ports of a die inside the PMGR MMIO region.
>>>
>>> Signed-off-by: Sven Peter <sven@kernel.org>
>>> ---
>>>  MAINTAINERS                     |   1 +
>>>  drivers/reset/Kconfig           |  10 +++
>>>  drivers/reset/Makefile          |   1 +
>>>  drivers/reset/reset-apple-cio.c | 182 +++++++++++++++++++++++++++++++ 
>>> +++++++++
>>>  4 files changed, 194 insertions(+)
>> 
>>> +
>>> +static int apple_cio_reset_probe(struct platform_device *pdev)
>>> +{
>>> +    struct device *dev = &pdev->dev;
>>> +    struct apple_cio_reset *priv;
>>> +    int ret;
>>> +
>>> +    priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
>>> +    if (!priv)
>>> +        return -ENOMEM;
>>> +
>>> +    priv->variant = of_device_get_match_data(dev);
>> 
>> Might be a dumb question, but does priv->variant also need to be
>> checked? Because later priv->variant->pmgr_child is and I *think*
>> it could return NULL.
>> 
>> (Or is this not necessary since in theory the device should only run
>> this if detected... so this should never be an issue?)
>
> You might be able to get this driver to probe without a device tree node 
> by manually forcing it with sysfs but well... play stupid games, win 
> stupid prizes.
> Adding the check is just two lines and doesn't hurt though.

Meh, not worth the extra lines of instruction. FAFO for the curious.


  reply	other threads:[~2026-08-09 17:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-09 12:16 [PATCH 0/3] Apple SoC CIO (USB4/Thunderbolt) reset controller Sven Peter
2026-08-09 12:16 ` [PATCH 1/3] dt-bindings: reset: Add Apple SoC CIO reset Sven Peter
2026-08-10 16:02   ` Conor Dooley
2026-08-09 12:16 ` [PATCH 2/3] reset: Add Apple SoC CIO reset driver Sven Peter
2026-08-09 14:30   ` Joshua Peisach
2026-08-09 15:20     ` Sven Peter
2026-08-09 17:13       ` Joshua Peisach [this message]
2026-08-09 12:16 ` [PATCH 3/3] arm64: dts: apple: Add CIO reset controllers Sven Peter

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=DKKKXXEMIO2G.LN1EYSEBL8CD@ubuntu.com \
    --to=jpeisach@ubuntu.com \
    --cc=asahi@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=j@jannau.net \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neal@gompa.dev \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sven@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