From: "M, Krishnamoorthi" <krishnamoorthi.m@amd.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, broonie@kernel.org,
linux-spi@vger.kernel.org, akshata.mukundshetty@amd.com,
bleung@chromium.org, groeck@chromium.org,
chrome-platform@lists.linux.dev, corbet@lwn.net,
linux-doc@vger.kernel.org, skhan@linuxfoundation.org,
andrew@codeconstruct.com.au, linux-aspeed@lists.ozlabs.org,
openbmc@lists.ozlabs.org
Subject: Re: [RFC PATCH 0/4] espi: introduce eSPI bus framework
Date: Wed, 5 Aug 2026 15:44:47 +0530 [thread overview]
Message-ID: <96494f6f-fbdc-4705-921b-97ded0acba18@amd.com> (raw)
In-Reply-To: <2026080416-lagoon-delirium-8e84@gregkh>
Hi Greg,
On 8/4/2026 5:48 PM, Greg KH wrote:
> On Tue, Aug 04, 2026 at 05:22:55PM +0530, Krishnamoorthi M wrote:
>> Feedback Requested
>> ==================
>>
>> 1. We chose a dedicated bus_type for the reasons described above
>> (capability negotiation, four independent channels, asynchronous
>> ALERT#). Does the community agree this is the right direction, or
>> is there a strong preference to extend the SPI subsystem instead?
>
> That's up to the SPI maintainers and developers...
>
>> 2. Is the blocking notifier chain the right mechanism for event
>> delivery to slave drivers?
>
> Notifier chains are almost never the correct solution, especially for
> real data you wish to send to devices/drivers. Just use a real
> callback function you have to register for, and a workqueue, or
> something like that. Ideally just use the process context of the thread
> that created the data in the first place, why can't something simple
> work like that?
>
Thank you for the feedback. The notifier chain was chosen to support
multiple slave drivers subscribing to events from a single controller.
However, your concern is valid — it is not the right abstraction here. A
cleaner approach is a typed per-device event callback on struct espi_driver:
void (*event)(struct espi_device *edev, struct espi_event *event);
When the controller decodes an ALERT#, it identifies the originating
chip select# and calls the callback only on the driver bound to that
device — no chain walking, no per-driver filtering, no untyped casts.
The callback is invoked directly from the threaded IRQ context that
decoded the event, keeping the delivery path simple as you suggested.
We will rework the event delivery along these lines in v2. Does this
direction sound acceptable?
Thanks,
Krishna
>> 3. Any concerns with the ops table design or the -EOPNOTSUPP fallback?
>> 4. Naming and structure of the public API in include/linux/espi/espi.h.
>
> What specifically are you asking for for this? Do you have userspace
> code you want to integrate, if so, does it work with this? And where
> does it live?
>
> thanks,
>
> greg k-h
prev parent reply other threads:[~2026-08-05 10:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 11:52 [RFC PATCH 0/4] espi: introduce eSPI bus framework Krishnamoorthi M
2026-08-04 11:52 ` [RFC PATCH 1/4] espi: add core " Krishnamoorthi M
2026-08-06 13:31 ` Uwe Kleine-König
2026-08-04 11:52 ` [RFC PATCH 2/4] espi: add slave device model and event notification Krishnamoorthi M
2026-08-04 11:52 ` [RFC PATCH 3/4] Documentation: espi: add subsystem overview and MAINTAINERS entry Krishnamoorthi M
2026-08-04 16:39 ` Randy Dunlap
2026-08-04 19:14 ` M, Krishnamoorthi
2026-08-04 11:52 ` [RFC PATCH 4/4] espi: amd: add AMD eSPI controller driver Krishnamoorthi M
2026-08-04 12:18 ` [RFC PATCH 0/4] espi: introduce eSPI bus framework Greg KH
2026-08-04 13:26 ` Greg KH
2026-08-05 0:42 ` Andrew Jeffery
2026-08-05 18:35 ` M, Krishnamoorthi
2026-08-05 10:14 ` M, Krishnamoorthi [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=96494f6f-fbdc-4705-921b-97ded0acba18@amd.com \
--to=krishnamoorthi.m@amd.com \
--cc=akshata.mukundshetty@amd.com \
--cc=andrew@codeconstruct.com.au \
--cc=bleung@chromium.org \
--cc=broonie@kernel.org \
--cc=chrome-platform@lists.linux.dev \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=skhan@linuxfoundation.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