From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-6.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 254FD7D099 for ; Thu, 15 Nov 2018 12:58:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388261AbeKOXGX (ORCPT ); Thu, 15 Nov 2018 18:06:23 -0500 Received: from mail.bootlin.com ([62.4.15.54]:40123 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728801AbeKOXGX (ORCPT ); Thu, 15 Nov 2018 18:06:23 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 905D220D73; Thu, 15 Nov 2018 13:58:35 +0100 (CET) Received: from bbrezillon (aaubervilliers-681-1-13-146.w90-88.abo.wanadoo.fr [90.88.134.146]) by mail.bootlin.com (Postfix) with ESMTPSA id 5F06E20D92; Thu, 15 Nov 2018 13:57:32 +0100 (CET) Date: Thu, 15 Nov 2018 13:57:31 +0100 From: Boris Brezillon To: 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 Subject: Re: [PATCH v10 0/9] Add the I3C subsystem Message-ID: <20181115135731.25f60990@bbrezillon> In-Reply-To: <76b1d15d-232c-d8ba-5eba-8394e71be725@synopsys.com> References: <20181026144333.12276-1-boris.brezillon@bootlin.com> <76b1d15d-232c-d8ba-5eba-8394e71be725@synopsys.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org +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. What we could do though, is expose I3C devices that do not have a driver in kernel space, like spidev does. > 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. > > 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