Received: by 10.223.185.116 with SMTP id b49csp5388883wrg; Tue, 27 Feb 2018 12:26:39 -0800 (PST) X-Google-Smtp-Source: AH8x227/YKSAyQZvAQUFxkfkuPAeg8fLLw7PxyUO2uCKBxtcFFkpjK2OwAmiZtB3+07ep/KQ+FzB X-Received: by 10.99.123.79 with SMTP id k15mr12367353pgn.173.1519763199433; Tue, 27 Feb 2018 12:26:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519763199; cv=none; d=google.com; s=arc-20160816; b=wwV2iWNYOoUz70ARYfakSb/4ktZ3jUHQ2KxUKwonXUNjkBjEsEBrkhNqKYY1H2cXFK vuSUdFnhFcRROhTbWK088W3BN3BEug/TJkrxkN5j38AcjsyuvJNuMB46AMM94zMnd4/7 PBjOLltD4/ZkHcArggRYnax5ABPFBgFm1FR2fcB8rASiTF6DEfm+zLCuvP2NPpafxocd 4yRcBz0IYSPEpX+DLVkZfsXIN9sA0XWRVwCO1Cu7iOp7aMiTBC/3tBJ4nMnYcsH/TISg mMP/Xw9kt2pILWuU3paq0iaTQX4RepMZzfVfA63XY7eThng1caFSAlhEahd+6ZY2aloX PP/A== 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 :arc-authentication-results; bh=d0y8RrxXX9cBJ3gVuRLSbPySinMrYMnL7qQaA8Z19aU=; b=u7U9BzYJl0XozJ4tiE0eck8/pxj6QqpObiZY9ioPxOWLg2Lxl7/xML0T+d7vccADCZ dfbyrW2AZw1+mLVu56v21/fEHqvPynBEEFuIvm2Syz6b/lhPX1MgtpSRKXwHTCpHp/hR QS0t+7hj4jNfaYMVNfxiLg/hd1SbG/ZwvptvKdJxIECg55mSFbx2z37guIxT0ImioZvf AZdu6C+qCz37i6y5xZudSVSGoXsVjuCqacvvENKMjpYNw+MfD2mBPQjDacj7bkPErhdm nbPbLKNG57F6KHWVbBX6PeYjDLhg2pg0OtBXGUEpwevdWryEAOgBelHTyP0zQL8hV3xN LYPg== 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 b195si7434532pga.552.2018.02.27.12.26.24; Tue, 27 Feb 2018 12:26:39 -0800 (PST) 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 S1751961AbeB0UZd (ORCPT + 99 others); Tue, 27 Feb 2018 15:25:33 -0500 Received: from mail.bootlin.com ([62.4.15.54]:38247 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751768AbeB0UZb (ORCPT ); Tue, 27 Feb 2018 15:25:31 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id CDC5D206A6; Tue, 27 Feb 2018 21:25:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.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 (unknown [37.171.238.219]) by mail.bootlin.com (Postfix) with ESMTPSA id 1D132207BB; Tue, 27 Feb 2018 21:25:16 +0100 (CET) Date: Tue, 27 Feb 2018 21:25:15 +0100 From: Boris Brezillon To: Przemyslaw Sroka Cc: Vitor Soares , Boris Brezillon , Wolfram Sang , "linux-i2c@vger.kernel.org" , Jonathan Corbet , "linux-doc@vger.kernel.org" , Greg Kroah-Hartman , Arnd Bergmann , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Geert Uytterhoeven , Linus Walleij Subject: Re: [PATCH v2 2/7] i3c: Add core I3C infrastructure Message-ID: <20180227212515.3a22524a@bbrezillon> In-Reply-To: References: <20171214151610.19153-1-boris.brezillon@free-electrons.com> <20171214151610.19153-3-boris.brezillon@free-electrons.com> <20180223213000.407461d2@bbrezillon> <1b8fe82f-079b-6f55-0e59-5773027faa8e@synopsys.com> <20180226213607.7161bb0a@bbrezillon> 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=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Przemek, On Tue, 27 Feb 2018 17:06:37 +0000 Przemyslaw Sroka wrote: > > > > > > > > Could you tell me why you think SETDASA is required? > > > > > > Yes, you are right... But in my opinion it is required as it does part > > > of DAA process. > > > > SETDASA is simply faster than ENTDAA, but only if there is no need to > > collect BCR/DCR/PID of such devices. I think most applications would like to > > have them as an status information so after all ENTDAA can be regarded as > > an generic approach (unless I'm mistaken). > > Below are 2 examples on how DAA can be executed: > 1st: > A1) SETDASA to devices with SA I'm not even sure all devices with a static address needs to be assigned a dynamic address with SETDASA (actually, I'm almost sure it's not the case, since, according to section "5.1.9.3 CCC Command Definitions" of the spec, all I3C slaves have to support ENTDAA). To me, it looks like you'd want to do that only is you really need to reserve a specific dynamic address and prevent the DAA step from assigning it to another device. > B1) DAA to remaining devices > C1) GET BCR/DCR/PID to devices that initially had SA > NOTES: C1 is optional and order of B1 and C1 can be changed While that's true in principle, in Linux we'll always retrieve BCR/DCR/PID (and more, like MAXDS), no matter how the device obtained its dynamic address. > > 2nd: > A2) DAA to all devices > NOTES: no need for any follow up steps as all information is collected during DAA As said above, that's not exactly how the Linux implementation works. Right now I'm ignoring the information retrieved during DAA and forcing a GETPID/GETBCR/GETDCR for every discovered device. This approach is generating a bit more traffic on the bus, but it also makes the implementation more generic, because we have a single function to add an I3C device, no matter how it's been assigned a dynamic address. > > As we can see 2nd approach is more generic and do not see any reason to add special handling for SETDASA unless there is any reasonable reason to do otherwise. I agree on one thing: as long as you don't have to reserve a specific dynamic address, SETDASA is not required. At least, that's my understanding. Regards, Boris -- Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com