From: Andrew Jeffery <andrew@codeconstruct.com.au>
To: Krzysztof Kozlowski <krzk@kernel.org>,
Kevin Chen <kevin_chen@aspeedtech.com>,
lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, joel@jms.id.au,
chiawei_wang@aspeedtech.com, linux-aspeed@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: "tomer.maimon" <tomer.maimon@nuvoton.com>
Subject: Re: [PATCH v1 3/3] soc: aspeed: lpc-pcc: Add PCC controller support
Date: Tue, 18 Feb 2025 11:26:53 +1030 [thread overview]
Message-ID: <6fd7cd57261ddf9831f57dc4c637b24e9f8982d9.camel@codeconstruct.com.au> (raw)
In-Reply-To: <e43b5f8f-37e4-4468-b3ca-5059a5e6f3c3@kernel.org>
On Mon, 2025-02-17 at 13:00 +0100, Krzysztof Kozlowski wrote:
> On 17/02/2025 12:48, Kevin Chen wrote:
> > +
> > + pcc->mdev.parent = dev;
> > + pcc->mdev.minor = MISC_DYNAMIC_MINOR;
> > + pcc->mdev.name = devm_kasprintf(dev, GFP_KERNEL, "%s%d",
> > DEVICE_NAME,
> > + pcc->mdev_id);
> > + pcc->mdev.fops = &pcc_fops;
> > + rc = misc_register(&pcc->mdev);
> > + if (rc) {
> > + dev_err(dev, "Couldn't register misc device\n");
> > + goto err_free_kfifo;
> > + }
>
> You cannot expose user-space interfaces from SoC drivers. Use
> appropriate subsystem for this with proper ABI documentation.
>
> See:
> https://lore.kernel.org/all/bc5118f2-8982-46ff-bc75-d0c71475e909@app.fastmail.com/
> and more discussions on LKML
Further, drivers/misc/aspeed-lpc-snoop.c already exists:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9f4f9ae81d0affc182f54dd00285ddb90e0b3ae1
Kevin: Did you consider reworking it?
Nuvoton have a similar capability in their NPCM BMC SoC(s) with the
"BPC" ("BIOS POST Code" controller). There should be some consensus on
the binding and userspace interface.
Andrew
next prev parent reply other threads:[~2025-02-18 0:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 11:48 [PATCH v1 0/3] Add AST2600 LPC PCC support Kevin Chen
2025-02-17 11:48 ` [PATCH v1 1/3] dt-binding: aspeed: Add LPC PCC controller Kevin Chen
2025-02-17 11:56 ` Krzysztof Kozlowski
2025-02-17 11:48 ` [PATCH v1 2/3] ARM: dts: aspeed-g6: Add AST2600 LPC PCC support Kevin Chen
2025-02-17 11:48 ` [PATCH v1 3/3] soc: aspeed: lpc-pcc: Add PCC controller support Kevin Chen
2025-02-17 12:00 ` Krzysztof Kozlowski
2025-02-18 0:56 ` Andrew Jeffery [this message]
2025-02-18 11:11 ` Kevin Chen
2025-02-19 1:04 ` Andrew Jeffery
2025-02-19 11:59 ` Kevin Chen
2025-02-20 1:22 ` Andrew Jeffery
2025-02-21 0:51 ` Kevin Chen
2025-02-25 4:27 ` Andrew Jeffery
2025-02-25 4:34 ` Mo Elbadry
2025-02-25 23:28 ` Andrew Jeffery
2025-02-26 0:48 ` Mo Elbadry
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=6fd7cd57261ddf9831f57dc4c637b24e9f8982d9.camel@codeconstruct.com.au \
--to=andrew@codeconstruct.com.au \
--cc=chiawei_wang@aspeedtech.com \
--cc=conor+dt@kernel.org \
--cc=joel@jms.id.au \
--cc=kevin_chen@aspeedtech.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tomer.maimon@nuvoton.com \
/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