From: Wolfram Sang <wsa@the-dreams.de>
To: Eduardo Valentin <eduval@amazon.com>
Cc: Haiyue Wang <haiyue.wang@linux.intel.com>,
jarkko.nikula@linux.intel.com, andriy.shevchenko@intel.com,
brendanhiggins@google.com, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv7 2/3] i2c: slave-mqueue: add a slave backend to receive and queue messages
Date: Mon, 1 Jul 2019 14:56:19 +0200 [thread overview]
Message-ID: <20190701125619.GC4399@kunai> (raw)
In-Reply-To: <20190605164651.15991-3-eduval@amazon.com>
[-- Attachment #1: Type: text/plain, Size: 2607 bytes --]
Hi Eduardo,
thanks for stepping up and pushing this further!
On Wed, Jun 05, 2019 at 09:46:50AM -0700, Eduardo Valentin wrote:
> From: Haiyue Wang <haiyue.wang@linux.intel.com>
>
> Some protocols over I2C are designed for bi-directional transferring
> messages by using I2C Master Write protocol. Like the MCTP (Management
> Component Transport Protocol) and IPMB (Intelligent Platform Management
> Bus), they both require that the userspace can receive messages from
> I2C dirvers under slave mode.
>
> This new slave mqueue backend is used to receive and queue messages, it
> will exposes these messages to userspace by sysfs bin file.
So, this is a read-only bin file. Sending is done via the standard
i2c-dev driver? Or not needed at all?
Regarding, IPMB, how does this related to the recently merged IPMB slave
driver?
http://patchwork.ozlabs.org/patch/1113278/
>
> Note: DT interface and a couple of minor fixes here and there
> by Eduardo, so I kept the original authorship here.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: Andy Shevchenko <andriy.shevchenko@intel.com>
> Cc: linux-i2c@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Haiyue Wang <haiyue.wang@linux.intel.com>
> Signed-off-by: Eduardo Valentin <eduval@amazon.com>
> +I2C SLAVE MQUEUE DRIVER
> +M: Eduardo Valentin <eduval@amazon.com>
Cool, thanks!
> +config I2C_SLAVE_MQUEUE_MESSAGE_SIZE
> + int "The message size of I2C mqueue slave"
> + depends on I2C_SLAVE_MQUEUE
> + default 120
> +
> +config I2C_SLAVE_MQUEUE_QUEUE_SIZE
> + int "The queue size of I2C mqueue slave"
> + depends on I2C_SLAVE_MQUEUE
> + default 32
> + help
> + This number MUST be power of 2.
I am not happy with this being a Kconfig option. Best would be a
per-instance configuration, so we could have differently sized mqueues
at runtime. I could think of another sysfs-file like
"mqueue-slave-config" which would appear after writing to 'new_device'.
And only after writing to 'mqueue-slave-config', the bin file to read
from would show up. But it is just a quick brainstorming, maybe you have
a better idea?
> +// SPDX-License-Identifier: GPL-2.0
> +// Copyright (c) 2017 - 2018, Intel Corporation.
A short description what this driver does would be nice.
Rest looks decent from a glimpse. I haven't looked into the gory details
yet, though, because I want to get the high level things straight first.
Kind regards,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-07-01 12:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190605164651.15991-1-eduval@amazon.com>
2019-06-05 16:46 ` [PATCHv7 1/3] dt-bindings: i2c: document bindings for i2c-slave-mqueue Eduardo Valentin
2019-06-11 23:14 ` Rob Herring
2019-06-12 2:46 ` Wang, Haiyue
2019-07-01 12:42 ` Wolfram Sang
2019-07-01 12:43 ` Wolfram Sang
2019-06-05 16:46 ` [PATCHv7 2/3] i2c: slave-mqueue: add a slave backend to receive and queue messages Eduardo Valentin
2019-06-05 17:02 ` Andy Shevchenko
2019-06-05 17:28 ` Eduardo Valentin
2019-07-01 12:56 ` Wolfram Sang [this message]
2019-06-05 16:46 ` [PATCHv7 3/3] Documentation: ABI: Add i2c-slave-mqueue sysfs documentation Eduardo Valentin
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=20190701125619.GC4399@kunai \
--to=wsa@the-dreams.de \
--cc=andriy.shevchenko@intel.com \
--cc=brendanhiggins@google.com \
--cc=devicetree@vger.kernel.org \
--cc=eduval@amazon.com \
--cc=haiyue.wang@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).