Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp560062imm; Thu, 6 Sep 2018 06:52:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZtExfoSsBz/8VINdjv1yjgbTMu+sUTyqz0RtsqwikdG76NlLHMFvFwnDk+ZbIS2fSgGkXV X-Received: by 2002:a65:448a:: with SMTP id l10-v6mr2874504pgq.382.1536241921837; Thu, 06 Sep 2018 06:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536241921; cv=none; d=google.com; s=arc-20160816; b=ej9WzMzhTfe0cpzFF80vqPH3oOvuguC2VgEmqhTi3L4TddWDUghNJVWfaXx5dubR7v 99WItdhxC9yyvI8lwz2amEIrH6X2RWCazxKEibVfKpx3G5+/MSY4gSWOp3XMaiSAY9R9 PtYVis8JPMugKSi3Uvca1QUbD3JNsJ55EkdJ92XmOVh1ViB/2uGeU0CJ2nZIPgD4hAzS l5rnAcL/5sIdQB9Ytcbm7ssmkG59fE3s7GA3d4zebTXH+dw5XV90IBBBNZmYyfOCIogL JIj1mJ3ybXjL2OBFGk+r2yXtoFNB/Hv9lIuiqpN12vlkG8kjZK8fGBdfc74j0kq7vF8j EN+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=JWjmBHEVj1JGlwFewNEI5+x+mt4bT2M/AOJo5QI4uDg=; b=dTU6zCA4FT15XI1K7k2g3CauJeNJapOsf6Ugp2D3JHZilTQ4oNPFSsPjYCU78Duzdr Mj46tRMfayIYxgBZqjdBHhNBZSNncHLQO86MOZLf57AYNOAp1KT+wqoD8bB+9meXlPvs 1JjIqQ+ElaBXN/FvIGViMrWnbAc7xVUycH9ONsMyYsCcAs802ReNr1KGGerhgy5hXqnZ kmlJgySpSal4nWx+Jc2+P3Y0aqyvnTvCxy8dxuvFhdOKWvytiiXMb6zDNsceqsLxIbhG iYhK0WW1MV0sqFVeQa3wqLR1HIYEGaZNveEKUR+adjcC/45taEer9EcAiIPPLXRpCUVB 8e4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=RjDymW4F; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 196-v6si5418461pgh.55.2018.09.06.06.51.46; Thu, 06 Sep 2018 06:52:01 -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=@synopsys.com header.s=mail header.b=RjDymW4F; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730044AbeIFS0B (ORCPT + 99 others); Thu, 6 Sep 2018 14:26:01 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:47782 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726926AbeIFS0A (ORCPT ); Thu, 6 Sep 2018 14:26:00 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id A8E7D10C1317; Thu, 6 Sep 2018 06:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1536241821; bh=5RAP9nqSKQ926+vpff6dok6KZ88dtvepvkeIiCG3YWs=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=RjDymW4Fu80i0kr/Pnjb0wbNUNsP1EnplgGWxTQaxHejdxmbxDGy0cEnZzgUKB6Tr y6+a5RMY3bkCn21mkjhbc+ZEHybSO3dhDZqlu8KB79B61u4CsbCKxy2B5flTNwXyeb 7ZN7uV7uW5YBTYoMR/zwuUDja3GZv3qoeylF6kDqHDfJZuyhrdZVJlClkXGecXdFo4 LyJ7lhUCDPWQx1yOnJ6ts49HGtH9YMErAp34w2UfpooQzw9omMHYKXiPxLZ+Pl4ttA M0yGbJBi7A2kHs+gMxxaipdTGA11DWCQfoA6xUY2p4qpKHJIa50/nlmRHZXskLaOY/ 7mYrckTk1geMA== Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id 90CE45465; Thu, 6 Sep 2018 06:50:18 -0700 (PDT) Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 6 Sep 2018 06:50:18 -0700 Received: from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by DE02WEHTCB.internal.synopsys.com (10.225.19.94) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 6 Sep 2018 15:50:12 +0200 Received: from [10.0.2.15] (10.107.25.90) by DE02WEHTCA.internal.synopsys.com (10.225.19.80) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 6 Sep 2018 15:50:11 +0200 Subject: Re: [PATCH v6 01/10] i3c: Add core I3C infrastructure To: Boris Brezillon , Arnd Bergmann CC: Przemyslaw Gaj , 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 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> <20180906152055.5618d235@bbrezillon> From: vitor Message-ID: Date: Thu, 6 Sep 2018 14:50:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180906152055.5618d235@bbrezillon> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.107.25.90] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 06-09-2018 14:20, Boris Brezillon wrote: > On Thu, 6 Sep 2018 15:14:37 +0200 > Boris Brezillon wrote: > >> 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=DPL6_X_6JkXFx7AXWqB0tg&r=qVuU64u9x77Y0Kd0PhDK_lpxFgg6PK9PateHwjb_DY0&m=Q9DWw3KGmshGw0f5QTiffbpbESyUlPx6KmASuDBtX9Y&s=HHE_y1kyMszJvP_tSP9JkDlPYxDywBeHwkMGgCR11uI&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. > Hm, one possible solution would be to register partially discovered > devices to the device model and let i3c_device_get_info() claim the bus > and request missing data when needed. This way, if the driver needs to > call i3c_device_get_info() in its probe path, it should work just fine. Why don't use the i3c_master_add_i3c_dev_locked that job? It create, attach and retrieve the device info. This can be triggered after the secondary master receive ENEC MR until them is keep in the driver memory. Best regards, Vitor Soares