Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8151428imu; Thu, 15 Nov 2018 07:20:44 -0800 (PST) X-Google-Smtp-Source: AJdET5cQeUVQx7wmDCfUCK6MnMJ4c5vbB9zVHTxAw96XuZe3rCb9jp2yCu8eOh6a0FYQtwN1Gosl X-Received: by 2002:a62:d405:: with SMTP id a5mr6946895pfh.116.1542295244538; Thu, 15 Nov 2018 07:20:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542295244; cv=none; d=google.com; s=arc-20160816; b=nSIeV79uM82SC67Aob6pcWPe0xetpDyoipfjH2womjrOMiyNq4Kt6HPeuW/fBvHQnv ty09+MnBEE63TQMUqkJQ/fEdVJ1aN6/Xuwt9u7om5exzYzo+5Q9BjoK/nfqZS+YUPbK1 0MAjMCsNmmQhuCbY4lf6PcfmdKyPwoawr3hlREirOdARjF9N1czvuQjmX9CMcm32xtUm Px1gJkljSs7KllnBYJ4yh0fsb7FrPVly+/9puiR38YGzorBeUwWWbMAS+kpTxj+EDHmR AHQGytvLgTgK/U3T3chBt4ZuxYAbOnOLs5vvzjXS1TtXGscPmKWGzHa22U74sVngyuJI qGog== 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=Yq5ldBhpTChZzRXYXew3+9ASC0TzupPPTJT0pR5rKLQ=; b=Ow2CcenVZBDHNNUPwd2S/5RR9mDuaWeO0cunPChmyN5Vixl9R2+qW7t6V4ReQdMYrs dzKySGJvcQ5ALu+1uHyNdx1+9DQ2VP9G+mFXzBaKcnP0Ru88hamgdeiLDdL1HMkgdSxF Il61CB0UEFSVa/zfmNNzA0oWp/ljU00sHyCEYCh9SMs08wM3fmcGK+zWQb0iKWMpb9W7 tfiRoW/7xR6pKtFJ1ZIHBdcYznWZ2+Q87ZyjSpU5j0cAGzWvnXO90Aohmq3OlYmTNHmS JPw0tfmGFLAmuyYTkq3EhJTsq2wArRuAqWqYKACGTzg8YZ+XZ1JCnB78w1+7PRowfy9n g4jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=iMiWWTfH; 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 w22-v6si27359248plp.110.2018.11.15.07.20.10; Thu, 15 Nov 2018 07:20:44 -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; dkim=pass header.i=@synopsys.com header.s=mail header.b=iMiWWTfH; 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 S2388582AbeKPB1A (ORCPT + 99 others); Thu, 15 Nov 2018 20:27:00 -0500 Received: from smtprelay.synopsys.com ([198.182.60.111]:40012 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388084AbeKPB1A (ORCPT ); Thu, 15 Nov 2018 20:27:00 -0500 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id B25D710C1089; Thu, 15 Nov 2018 07:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1542295124; bh=nEHNsJMyS7jCDki6CAHrjqmUA5xGEE3ZJA3dV32O4Bs=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=iMiWWTfHW7tZN1uPXyNnPVyxKudIB6qo3CBXAo9Sp6CjnSAfcllHZFmDgupXYFq7c 9RTSSaFhT8MRwTSk79fj8zcr7wFT2cI3tU8tUq3fBJuUM0xtqBDeZhbCuFo/+p9GNh D5fKLalEKQ2QH7+QVpJmoQKyH9pCc2JU1OAi5bQ1iC/qbe8H8FTelQWcNp7P5dH2Wf MYXcSO7DCr5OYWpTLf6R8TALAq/gwq/g/HqnVM1V8dGYbiSQFHTR2SIvARi/Z2j3cN jqFocbR1D7ig43wqRB6Wa7ybj1lIcgzyfr9voGevfmmNkA3UkK3q1sWQgM6oNHUTKY IgBFdCKfPJLOQ== Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) by mailhost.synopsys.com (Postfix) with ESMTP id 477B65B6A; Thu, 15 Nov 2018 07:18:42 -0800 (PST) Received: from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by us01wehtc1.internal.synopsys.com (10.12.239.235) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 15 Nov 2018 07:18:42 -0800 Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by DE02WEHTCA.internal.synopsys.com (10.225.19.92) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 15 Nov 2018 16:18:40 +0100 Received: from [10.0.2.15] (10.107.19.116) by DE02WEHTCB.internal.synopsys.com (10.225.19.80) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 15 Nov 2018 16:18:40 +0100 Subject: Re: [PATCH v10 0/9] Add the I3C subsystem To: Boris Brezillon , vitor CC: Wolfram Sang , , "Jonathan Corbet" , , 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" , , , Geert Uytterhoeven , Linus Walleij , Xiang Lin , , Sekhar Nori , Przemyslaw Gaj , Peter Rosin , Mike Shettel , Stephen Boyd , Mark Brown References: <20181026144333.12276-1-boris.brezillon@bootlin.com> <76b1d15d-232c-d8ba-5eba-8394e71be725@synopsys.com> <20181115135731.25f60990@bbrezillon> From: vitor Message-ID: <7f21765a-87b3-9137-fb92-6c59483776de@synopsys.com> Date: Thu, 15 Nov 2018 15:18:21 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181115135731.25f60990@bbrezillon> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.107.19.116] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 15/11/18 12:57, Boris Brezillon wrote: > +Mark Brown for the question about /dev/spidev > > Hi Vitor, > > On Thu, 15 Nov 2018 12:14:37 +0000 > vitor wrote: > >> Hi Boris, >> >> Given the current state of the subsystem I think it might worth start to >> think how to expose the devices under /dev. > Thanks for starting this discussion. I'm not against the idea in > general, we just need to be careful when doing that. > >> My initial thoughts are to do the same think as for i2c, expose the >> buses or the i3c_devices and use ioctl for private transfers. > Exposing the bus is dangerous IMO, because an I3C bus is not like an > I2C bus: > > * I3C device needs to be discovered through DAA > * I2C devices need to be declared ahead of time, and LVR is used to > determine the limitations on the bus at runtime > > So you'd anyway be able to interact only with devices that have > previously been discovered. > > Note that the virtual I2C bus is already exposed, but any command > targeting an address that is not attached to a registered I2C dev will > get a -ENOENT error. I initially thought to do the same thing for the i3c devices adding a routine get_i3c_dev_by_addr()... > > What we could do though, is expose I3C devices that do not have a > driver in kernel space, like spidev does. ...but I like more this approach. >> Some >> direct CCC commands can be sent through the /sys as you plan for SETNEWDA . > Yes, CCC commands that need to be exposed to userspace should be > exposed through sysfs, or, if we decide to create a /dev/i3cX device > per bus, through ioctls. There already some attributes exposed, just need to add the possibility to write to them and off course add some that are missing like GETSTATUS. > >> What do you think about this? > I think this request is perfectly valid, we just need to decide how it > should be done, and before we take this decision, I'd like to get > inputs from other maintainers. > > Mark, Wolfram, Arnd, Greg, any opinion? > > Regards, > > Boris Best regards, Vitor Soares