Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp587227imm; Thu, 6 Sep 2018 07:13:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbKrLXun8zWfg5D/KHJuMiM0oSJ99RBMoOkTn5pOXBpXVoYdoKC3e1kbQFVdnP1CuKnt+2/ X-Received: by 2002:a63:2150:: with SMTP id s16-v6mr2919463pgm.267.1536243204423; Thu, 06 Sep 2018 07:13:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536243204; cv=none; d=google.com; s=arc-20160816; b=XNoWc4WxlWSBGIOptVbH0AGQ5/9hAiQt1fQ5PtNU8OHWll15zJ+sCIQn1VtX64+IRL fG+JMx9iBZHfGIl+ZFwCrNDW8EWsFHbwYQl3/ygO2UaS65vpRk7b3M4zLzw84en3GofE nrap2zizzie08XkbX4iw3KhwQ/KT6tbKJb/y/99ixdOzXPEmrmHInujGToiwMU4xP4r1 dNokt3vHoMOmDCi/ckzZBg1VrVtLCsQ/1fcRnAb3bebVUFa61p15ev8UE54SlgAHP3sK sqZVlAEUfnZfaFB+psRQT1ZqXhydXHhKg9XXNE/zo54Ril9eJQ5NY35rQ929Sf947Srg F46g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=j6H/6QlUEa98pMMq994KB16P8WIF37tD83Pjyuryfus=; b=IKPtiSLX3zXqrQmCP8KLiXcq6kqtIc5EXHXQf8tqyeBUcxjTqUge9PTV6baDGdhBYu yhe58OioZRvqNKVZmiLDKFU6UkMp+/jA8pOFxgPnuQgByA+AIFjj87/vjFle993kT+gr yxgQ5biW2C8MeRivogEdZh2QoQXmKbz6xgNGNBV4LYZqt2C5GEn5lfh6JotOGfrz3/RA oAVhk7rkNrEgtRXV+CBOK87GVxMily1hrhPjietleTaBWMSOsl32M+5qzEjTAMVY42Ta f8d+IMEwMdu+egzwQbLJn+02YJ1CUeolRq6romaibdkFmRYgiwT36h1NWtEAc+aDGky0 A2fg== 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 u26-v6si4687543pge.590.2018.09.06.07.13.07; Thu, 06 Sep 2018 07:13:24 -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 S1729693AbeIFSpp convert rfc822-to-8bit (ORCPT + 99 others); Thu, 6 Sep 2018 14:45:45 -0400 Received: from mail.bootlin.com ([62.4.15.54]:58749 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726837AbeIFSpo (ORCPT ); Thu, 6 Sep 2018 14:45:44 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 7B1DF2072B; Thu, 6 Sep 2018 16:09:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-30-219.w90-88.abo.wanadoo.fr [90.88.15.219]) by mail.bootlin.com (Postfix) with ESMTPSA id C4CE1206FF; Thu, 6 Sep 2018 16:09:48 +0200 (CEST) Date: Thu, 6 Sep 2018 16:09:47 +0200 From: Boris Brezillon To: Przemyslaw Gaj Cc: Arnd Bergmann , Vitor Soares , "open list:GPIO SUBSYSTEM" , Sekhar Nori , Wolfram Sang , Linux I2C , Jonathan Corbet , "open list:DOCUMENTATION" , gregkh , 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 , DTML , Linux Kernel Mailing List , Geert Uytterhoeven , Linus Walleij , Xiang Lin , Peter Rosin Subject: Re: [PATCH v6 01/10] i3c: Add core I3C infrastructure Message-ID: <20180906160947.3c80072f@bbrezillon> In-Reply-To: <5AD923AE-E86E-4414-A48F-CE7399E18431@cadence.com> References: <20180719152930.3715-1-boris.brezillon@bootlin.com> <20180719152930.3715-2-boris.brezillon@bootlin.com> <20180824143934.6d6b6487@bbrezillon> <20180824201600.7d80bca9@bbrezillon> <20180828140209.29155d00@bbrezillon> <4DBE768F-3CDC-41BE-9CC8-E294E7277CB1@cadence.com> <8abfb007-d755-36a4-5960-fddd61d04aa2@synopsys.com> <3D2681D9-1ACC-42FF-9FAB-D86B3C689003@cadence.com> <9584757a-e7e2-5bfe-fc2c-e9bc14ad65a8@synopsys.com> <25862F03-9823-42B0-87AC-AE36D7E9C780@cadence.com> <20180906151437.4259d6fc@bbrezillon> <5AD923AE-E86E-4414-A48F-CE7399E18431@cadence.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Sep 2018 13:47:29 +0000 Przemyslaw Gaj wrote: > On 9/6/18, 3:14 PM, "Boris Brezillon" wrote: > > EXTERNAL MAIL > > > On Thu, 6 Sep 2018 14:59:46 +0200 > Arnd Bergmann wrote: > > > On Thu, Sep 6, 2018 at 2:43 PM Przemyslaw Gaj wrote: > > > > > > Hi Boris, Vitor, > > > > > > This repository does not contain full kernel sources, but it should be enough to discuss mastership request feature. > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_przemekgaj_i3c-2Dlinux_commit_d54fe68a9d3e573c0c454a2c6f1afafc20142ec5&d=DwICAg&c=aUq983L2pue2FqKFoP6PGHMJQyoJ7kl3s3GZ-_haXqY&r=CMnAfM_OfpqcWZRfiqcRWw&m=OPSa25ENnrF0Qv70DG49ZngfdygJZubjo3TOgBA3pJ4&s=_C6i1KPplQGcWvQYPkrGx7V3TjKDJvqt3KG-vcdU2K4&e= > > > > > > Please keep in mind that this is initial version, but mastership works correctly. I added one property to DT to reflect relationship between masters. > > > It is possible to request mastership on demand (using sysfs. Useful in case when Linux machine is equipped only with secondary master controller) or automatically change operation mode when device driver wants to read/write something from/to device. > > > > > > I'm sure I will have to rework something because this was implemented on sources from PATCH v4. I saw that Boris released v7 yesterday :) > > > > > > Can you explain the reason for having a user space interface and DT property? > > I thought we had concluded earlier that we wouldn't need that, but it's possible > > that I missed something in the discussion since then. > > I don't think the sysfs knob is needed, this being said, after thinking > a bit more about mastership handover and the secondary master case, I > think we have something important to solve. > > When a master is not in control of the bus, it gets informed of devices > present on the bus by monitoring DAA or DEFSLVS broadcast events. That > means the secondary master should populate the bus with I3C/I2C devices > on such events, but that's not enough, because DEFSLVS/DAA do not > provide all device info. Some of them (like read/write/ibi limitations) > require extra CCC commands, and, to send those CCC commands, the > secondary master must claim the bus. We could add a case where we > declare devices as partially discovered until the master acquires > ownership of the bus, but that means part of the data returned by > i3c_device_get_info() will be inaccurate, which might have an impact on > some i3c driver ->probe() functions. > > How do you want to handle cases when secondary master joins the bus after > DEFSLVS? Of course we can send DEFSLVS after secondary master joins the bus. That's already the case ;-). Every time the current master discovers another master, it's sends a DEFSLVS at the end of the DAA procedure. > > We could also say that partially discovered devices should not be > registered to the device model, but we then hit the problem of "who can > force the secondary master to claim the bus if there's no users?". > > Now I feel like I missed something. Do you want to populate second instance > of the same physical bus? If yes, then we don't need to have reference > between masters in DT. This is the discussion we've had about 1 month ago with Arnd, Wolfram and Peter, and the conclusion was that 2 different masters connected to the same physical bus should expose 2 different buses (which means having the same physical devices exposed 2 times in Linux).