Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2083035ybi; Mon, 1 Jul 2019 05:57:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXw7L8HAlyy/aGjlC+Bht7ZWOu9ylB4r9vawQcGIBjMHs5QBab2V0/hefydeuzD+KbWRDi X-Received: by 2002:a17:90a:c596:: with SMTP id l22mr31441531pjt.46.1561985864924; Mon, 01 Jul 2019 05:57:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561985864; cv=none; d=google.com; s=arc-20160816; b=E2nRXBUAVxWnzb6hYw0zAI0c5PyB9ywuMP5vIoberyOfvlyoQskbYVLEt+l/9YAq+d rf47dDjwMIf+pbZZbiviFO538mfzubGt9h3jXAr3+lfC7CxvujbVBVR/t3G6yaJZ3txw enFKRxARCRObSrLdmcpILcOu9JPqxcEPybxqvaEIbwD1caWyI93emGN1MEK/vkvW3uLt Miovfd/1ePW1nJ3DiMGVtULixenrtZd86GjPQfHQymWMfR+Pv9SZNNUdBhgWWkwlQ8hd iFnbWKN18FuAeeuetPxcMT4PUZGT6WerXZnWDppN7NwaYW6PRaAvekXMl4SXAyBQiec/ 4dmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=IPqEMLLmhn4GJsJ+HIV1Agx8F2yxmLsSbB9tvq03Nio=; b=GYy5RF6buJ15JjW2fwBXTWy0EQQBCS2ujs8jPYUKlxl9YxMf70dl3BZmvwHZqkZvxL +aUehvSAiHYKLLtctfPkwqAbqfRW4LsV4r6dbhLnIpxKQfTPrhokbR09GrfVYW9TRwX4 JPEa+/U22Ynxp9zgMpIOhEQJ9TQB3QOftRMFaY7pxDV4cgeDYFaKrgflfioBy2hXA4RG 1jT5GiUsjhM7jDeiy//980ZLL8m2tofpxZ1TodqWs2BE4vispI6IPNLxLQhf3ei8lCxm 92K9S9HF47TJMO1k3iEmKXKx131+B7QEsTXrO6M+/tC3kAk4n29DVv8jbZhZzKQwpkGY F4Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si9934065pls.372.2019.07.01.05.57.28; Mon, 01 Jul 2019 05:57:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727597AbfGAM4W (ORCPT + 99 others); Mon, 1 Jul 2019 08:56:22 -0400 Received: from sauhun.de ([88.99.104.3]:55766 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727249AbfGAM4W (ORCPT ); Mon, 1 Jul 2019 08:56:22 -0400 Received: from localhost (p54B3346F.dip0.t-ipconnect.de [84.179.52.111]) by pokefinder.org (Postfix) with ESMTPSA id 486CD2C360B; Mon, 1 Jul 2019 14:56:19 +0200 (CEST) Date: Mon, 1 Jul 2019 14:56:19 +0200 From: Wolfram Sang To: Eduardo Valentin Cc: Haiyue Wang , jarkko.nikula@linux.intel.com, andriy.shevchenko@intel.com, brendanhiggins@google.com, Rob Herring , Mark Rutland , 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 Message-ID: <20190701125619.GC4399@kunai> References: <20190605164651.15991-1-eduval@amazon.com> <20190605164651.15991-3-eduval@amazon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XMCwj5IQnwKtuyBG" Content-Disposition: inline In-Reply-To: <20190605164651.15991-3-eduval@amazon.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --XMCwj5IQnwKtuyBG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > 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. >=20 > 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/ >=20 > Note: DT interface and a couple of minor fixes here and there > by Eduardo, so I kept the original authorship here. >=20 > Cc: Rob Herring > Cc: Mark Rutland > Cc: Wolfram Sang > Cc: Andy Shevchenko > Cc: linux-i2c@vger.kernel.org > Cc: devicetree@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Haiyue Wang > Signed-off-by: Eduardo Valentin > +I2C SLAVE MQUEUE DRIVER > +M: Eduardo Valentin 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 =66rom 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 --XMCwj5IQnwKtuyBG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl0aAvIACgkQFA3kzBSg KbZHHBAAhj0zApTWfO1ifL64ykk+MUyKkgwwOboj5C4k8bbUZIapXHN0VaWbceJD icCv9zkojTLNkUf1f1RTdiY/gFZvpIsLOAuWLhrLZi/2BhUi82BVzuqo/KO6LQc/ I6DDCHohHYX4CgqGNCou81bir0LZ9QEBUp8QzEWKmnbcE0IVQmnT18HHXUW6D7Qn qiKB8kuZGLv6M/AjBlrfhkKphafmk27PMN3dL1W2n/6SqKYdTUwPKM05W2FiP0ZR pWIPpcsWcQSeRUw+uEqpkohZbNgv67crjjFQAofm7bVCgxMVI8SwZ1qHZWAJtMgX d2ySWt0cwDpoTD795j0LR1txKOVZ/4ZdXMFTQUKyofEZacfkLOUQjK33HywAnlz8 6Uw6WIbfhgYOJhGqzXUZmZD/QQhM2VpFqx5/5H/kjNInlHlz4F80Oacyt6D2oVT5 WHnM37F48jdBqFXEkQtRX6ZPnuX4+mXMqHzoM/6yjo41xY+Ed44MI2g/nmde22lf B+46ujovmiE48YPw7bJOhXLOHAqbML4ZCTa58s4lzpCN4QgtVv7VWw/xfyOgP0mx jLZWX0M5oIyFlyo3D2jUZmSISRDLoy+OHndWSz6qgf6XWJfUU82bi/y9zz5Y5yLu f0lYrIUzrF1k5OWpxSYaFUzaPZB2RVb9CkvZau68B3i35eF+e+0= =eaxR -----END PGP SIGNATURE----- --XMCwj5IQnwKtuyBG--