Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2302200imm; Sat, 23 Jun 2018 14:41:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKn3cACMS6I5CNxdLBT3Wu4yeWeK/m/ciLj7Qb1AbzQqnxSPUI6y9Y8gSPdchYAm5HcXqct X-Received: by 2002:a63:b609:: with SMTP id j9-v6mr5857218pgf.335.1529790111150; Sat, 23 Jun 2018 14:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529790111; cv=none; d=google.com; s=arc-20160816; b=v7ob8mL316o+xygb/3M5SvLaWdlK1B4UzLvNX9xUrPtpO8B82KLGYqEUPmrL+hbw67 5ceIAl8Wzv21c4hasFHuwzVEFMnGRoNSxtGLP04l1V30MOySw7+Qgliicx8jD3CuUp7E ddAINojdJPaNCNk0PY56KpJXGXQHjXPT/vufXfwEmQNIdUFN1YOpAROQJ1WjInUtbptH xxV2bLlbwqmCMfEs6DJsp5ctfQKQWvEgIlOXLPyYNcyfh2m9LkF/C6mtMp+mUpuxUt41 fp0M97NhpbBmzaqzhdZDTiE5b+kdslFHMWnfvlDclbM4ou3kXtCBynRtJchWejB7iyl3 DCtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=mUcRub+xRx0y2h8aKmvnLmppsD0mOhuDcKwITxeXcBk=; b=cuczdFp14BLjqF5/58qgwc73SGZjH9B/QCtoiNZY/NyvsZbuQipZGUNpqI+S3wAcBs geAwZVFtQvNnK59DqW7PZwGJLznaIn3XrGQ5zjMEgShIV+6y0Ai9XLX7KvHY1MQNXyVw TGsLAFVqC2CYykpeF0nPTcNAL8IbYO7k1vLWU7/87WEUNqEKCGD88ulNV/LwZ+Fsscew zD2hYQFyYzAZXS1x5Cjjb5FWlF3vD1RL9ILKjw3Xq+o698L64eP4BggZk76cTX5KIPyf omGT+87BGDayyMAhe8c0kYT1I4xLOG27RXKe18ydG8YVu8mRcq8i2TOkNOp9hPAIsY+l PfTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axentia.se header.s=selector1 header.b=ghP0GiQU; 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 k62-v6si1249571pgd.501.2018.06.23.14.41.37; Sat, 23 Jun 2018 14:41:51 -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; dkim=pass header.i=@axentia.se header.s=selector1 header.b=ghP0GiQU; 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 S1751936AbeFWVkw (ORCPT + 99 others); Sat, 23 Jun 2018 17:40:52 -0400 Received: from mail-he1eur01on0119.outbound.protection.outlook.com ([104.47.0.119]:35203 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751838AbeFWVks (ORCPT ); Sat, 23 Jun 2018 17:40:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mUcRub+xRx0y2h8aKmvnLmppsD0mOhuDcKwITxeXcBk=; b=ghP0GiQUE3HS4nB289EgB2BUS3w3fr9UiacWsHQ7xCgEnTkQPNuZzOHXHmDiHyQeDHRAL3ihaJ2niXobMOX/ascIhLnd3kNoQmmzFyikILJc8y+JQxgpkMhcIDwkAFIv9bKuyXR7oeZy4WTc9ravJ1Yk3SM4r5ETKTiBEIExGDA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from [192.168.13.3] (85.226.244.23) by AM5PR0201MB2449.eurprd02.prod.outlook.com (2603:10a6:203:34::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.21; Sat, 23 Jun 2018 21:40:41 +0000 Subject: Re: [PATCH v5 01/10] i3c: Add core I3C infrastructure To: Boris Brezillon Cc: Wolfram Sang , linux-i2c@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Greg Kroah-Hartman , Arnd Bergmann , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Rafal Ciepiela , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vitor Soares , Geert Uytterhoeven , Linus Walleij , Xiang Lin , linux-gpio@vger.kernel.org, Sekhar Nori , Przemyslaw Gaj References: <20180622104930.32050-1-boris.brezillon@bootlin.com> <20180622104930.32050-2-boris.brezillon@bootlin.com> <20180623121705.1d618c5d@bbrezillon> From: Peter Rosin Organization: Axentia Technologies AB Message-ID: Date: Sat, 23 Jun 2018 23:40:36 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180623121705.1d618c5d@bbrezillon> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR0402CA0050.eurprd04.prod.outlook.com (2603:10a6:7:7c::39) To AM5PR0201MB2449.eurprd02.prod.outlook.com (2603:10a6:203:34::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4856e6c9-ccc8-43f2-67b5-08d5d951f8e7 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(7021125)(8989117)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(5600026)(711020)(2017052603328)(7153060)(7193020);SRVR:AM5PR0201MB2449; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2449;3:uNEtmHlV0aA9G5UYuN6BKYChe0oVOCBIt+2Xx86Vm+aKospq7gkui5GwH906KpxCznB23H6pJtVnlrwqny6lVpaAWeEzbkPuxr1jeGEan4cE077zSssmKZBtcYUG/jmwpEt5XNtXst6gWz/zS23y0MYOga2UmiVcYqhdfoq76V0VXONwr8bLj/AtqHP37vOS/ayTmbL0KgfuiQ8KNF7B8zD6YgFR8APjhLxdJU8vJtiM398svD7qmg+zd+nKNuBv;25:0tKHDHwpiWJBgbCvIrrVynqMAc4UzaiWbsx92tQfZiptvxcFKzZWTZcc5FUrLDAcLnY+4Wb86lm07WTLedEwFIjFtYvLZvSjahXbtMb8oSlUiiNMusJjw3RbEolwbLY+tU0pHoyWX3YvPVntt8t5MMoVZiDqMXc8FeGtdnd35QlM1Oh2EGSTj5sWWqY9XsNMP1kl/uDaPGSaTurM1NN13RedHjiZwLvMP+KymnSAJNoJpZw8Z4E0Cxkb8KGD0JPnFO9dNHhzjqlpRuCLumOiY+jweolZ2R3r43YmOv4pq/hG6aRsSUncdKYDP3h0pqbMZ2zOI/DZ+HecDH2sk6GFfw==;31:cqhvb9H3qDzW/jilk2A2ltclIyy0rT3MA9Gkg5n+ZtNZFskuKkI8bcinc0J43Q98iuF8Kp/CmVabuC1zeauyddRgM/aiqCxhXOiRG/hioyKZOvKYVGXTQimnArfy6csqLq0iMC3W35fTqlkW3sgDt7oQYCEMuFRTUcJ+0a1jfDGiv4KwkDbjGbzjw/dwg2Yh+aeD40i7iNh97NQm59utTPUAy034lbCezswkcfga4vY= X-MS-TrafficTypeDiagnostic: AM5PR0201MB2449: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(35073007944872); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(2016111802025)(6043046)(6072148)(201708071742011)(7699016);SRVR:AM5PR0201MB2449;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0201MB2449; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0201MB2449;4:jf5ghoSa6bTVQsS7SivrlPV1Y6NVHTwzlNBZILFosszA9dwpiMnWbHoQHg7nnamQ42EhTGz8g1yQQZsZqk89e0vLJz4ua+kxnENWEdmYSIN5zsQVs4OWbsUEK64pfMMQ0CX56a21406dj62KbXZGmmbLKzMEC43BdNHN8cdRD/cwX+ZuibdryGU7Wt2sFexvFvdwp7BFR/MCRDdCcFi9U0n2ARWkQ0VuzeQTi2/FSfC1TYmSab2SVk9wHXf+t9rJomzqczhE+3jhjIuXD12mLFqYWqG3nWp6i17kpFxtp1PJ/wIudYx1IT72AvOS4Tou X-Forefront-PRVS: 07126E493C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(376002)(39830400003)(396003)(366004)(346002)(39380400002)(52314003)(189003)(199004)(16576012)(97736004)(316002)(117156002)(105586002)(2906002)(7416002)(50466002)(25786009)(3260700006)(58126008)(7406005)(54906003)(478600001)(64126003)(86362001)(230700001)(8676002)(81156014)(3846002)(6116002)(106356001)(81166006)(8936002)(31696002)(36756003)(7736002)(305945005)(93886005)(65806001)(26005)(66066001)(74482002)(65956001)(77096007)(186003)(31686004)(16526019)(65826007)(486006)(59450400001)(386003)(53936002)(53546011)(229853002)(446003)(2616005)(956004)(6916009)(476003)(11346002)(68736007)(52146003)(36916002)(6666003)(5660300001)(6246003)(23676004)(2486003)(52116002)(4326008)(76176011)(6486002)(47776003)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0201MB2449;H:[192.168.13.3];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjAyMDFNQjI0NDk7MjM6aS9qR0VWNy9QZS9lQjc4M0psVXM5NjBi?= =?utf-8?B?ZVpzL0V5UWVsNlgySFFHUGVpd25CYUlMYmdqUStTQUdoZGtNS0pSWnBsSk44?= =?utf-8?B?eERldHdwT2hZbXdwRWdteEJMM2ZoUUlndVJFZ3FCZ0YraWNtUDBSRDBEbWRw?= =?utf-8?B?RmcwYlRTWmVYWVNNblpmZkNNQ244dm5CT3M0QjNvQmcxWmJEQVBQeU9JZG5y?= =?utf-8?B?YVZNS2Foc240L2dyeUw0T3d4YzZoR1BDVUVjYVFTcE9MRUVVckczMUl2cmg3?= =?utf-8?B?ZFRsbTY2Nmx3dnpXOVQ1RFc0NmxScUtsZTE3TjVNM3dHcHBJM2tIWitWMWVB?= =?utf-8?B?WDcwbEhKL2F1YUo3M0EvL2VsS1BCaHZZZWR4U2crdTU1SFBCZFMwVi9BK1ZQ?= =?utf-8?B?SEVtbHE3bml6UDZkUVlQNmFJNXZwbVYyYUkzaStqL1BBNzBKeTVVNmdERVJH?= =?utf-8?B?ditCUFlDbXR1b25Qek1hUVYrdTJoVFFnSkppVE1ydXZuY0VNOU9zUVpVM2FG?= =?utf-8?B?SkhpelRXaVJZSEV1TG5LMGhoVXVkaFBsT0RPb3p5VGp3RDdCMWZvUzg1ak04?= =?utf-8?B?NjBEZEZNcStFbXM3VkxwN21PdHV5RjJlTW5vbFhjU2dQa2dJcjZtejh3eHV2?= =?utf-8?B?YXRW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tOfSmYjtnhrH33W5kL1Q1m6RhTmWvr/FqiN18fyeBZ+sgU1CkLshOybUQiJyJ0vBq7p4goiOloBAjY1g7VtZc1wIxrMrLd+tUn0/LekGNa9ljHw0DxvCz7VDyp1TupIby9WJOHj945qAAc/Q0PwjIfSFaeoRsMh3QLzko3CrjCAC5LAHX10/dnFbCDPi7yb4vbziN3dBkSKlI2 X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2018 21:40:41.4409 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4856e6c9-ccc8-43f2-67b5-08d5d951f8e7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0201MB2449 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-06-23 12:17, Boris Brezillon wrote: > Hi Peter, > > On Fri, 22 Jun 2018 23:35:34 +0200 > Peter Rosin wrote: > >> On 2018-06-22 12:49, Boris Brezillon wrote: >>> Add core infrastructure to support I3C in Linux and document it. >>> >>> This infrastructure is not complete yet and will be extended over >>> time. >>> >>> There are a few design choices that are worth mentioning because they >>> impact the way I3C device drivers can interact with their devices: >>> >>> - all functions used to send I3C/I2C frames must be called in >>> non-atomic context. Mainly done this way to ease implementation, but >>> this is still open to discussion. Please let me know if you think >>> it's worth considering an asynchronous model here >>> - the bus element is a separate object and is not implicitly described >>> by the master (as done in I2C). The reason is that I want to be able >>> to handle multiple master connected to the same bus and visible to >>> Linux. >>> In this situation, we should only have one instance of the device and >>> not one per master, and sharing the bus object would be part of the >>> solution to gracefully handle this case. >>> I'm not sure we will ever need to deal with multiple masters >>> controlling the same bus and exposed under Linux, but separating the >>> bus and master concept is pretty easy, hence the decision to do it >>> like that. >>> The other benefit of separating the bus and master concepts is that >>> master devices appear under the bus directory in sysfs. >> >> Are bus multiplexers relevant to I3C? > > Not yet, but who knows. > >> The locking needed for handling >> muxes for I2C is, well, convoluted... > > Do you remember what was the problem? > > Anyway, I'd really like to have basic support upstreamed before we > start considering advanced use cases that do not exist yet. Don't get > me wrong, I'm not against having the multiplexer/locking discussion, > but it should not block inclusion of the I3C subsystem. I'm trying to avoid the unfortunate situation in I2C where there are two slightly incompatible locking schemes for muxes. There's probably nothing to worry about until the first I3C mux is added though. But since I2C devices are supposedly compatible with I3C that might be the case from day one? --- If I read your code right, I3C client drivers will typically call i3c_device_do_priv_xfer (instead of i2c_transfer/i2c_smbus_xfer) and i3c_device_do_prov_xfer will grab the i3c_bus_normaluse_lock during the transfer. This seems equivalent to normal use in I2C with i2c_transfer/i2c_smbus_xfer. When muxes are thrown into the mix, you find yourself needing to do more than the "real" transfer with some lock held. In I2C there is an unlocked __i2c_transfer, and locking/unlocking is exposed. Muxes typically grab the lock, set the mux in the appropriate position, do an unlocked __i2c_transfer, optionally sets the mux in some default position and then lets go of the lock. See e.g. i2c/muxes/i2c-mux-pca954x.c However, that is the simple case. There are also muxes that are controlled with GPIO pins, and that gets hairy if the GPIO pins are controlled from the same I2C bus that is muxed. The GPIO driver would have to know that some GPIO pins need to use unlocked I2C transfers for that to work with the above locking scheme. And no GPIO driver does not want to know about that at all. I.e. you have two fundamentally different requirement depending on if the GPIO pins controlling the mux are controlled using the muxed bus or if the pins are controlled in some completely unrelated way. The latter case is probably the normal case, with the GPIO mux controlled directly from some SoC pins. In the latter case you also want to prevent any transfer on the bus while the GPIO pins for the mux are changing, i.e. the total opposite of the former case. It gets really really hairy if you have multiple levels of muxes... There are a some old drivers (e.g. i2c/busses/i2c-amd756-s4882.c) that handles this by simply bypassing the GPIO subsystem, but that is not really an option if some pins are used to mux the I2C bus while some pins are used for other things. I don't know if this affects I3C before muxes are added, but I suspect muxes will happen sooner rather than later, since the spec mentions that the bus only support 11 devices maximum. 11 don't seem like a lot, and it seems likely that there will be a need to have more devices somehow... But just maybe, in order to not run into the above situation, it needs to be handled right from the start with preparatory and cleanup stages of each transfers, or something? Cheers, Peter