Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7989624imu; Thu, 15 Nov 2018 04:59:46 -0800 (PST) X-Google-Smtp-Source: AJdET5e1aWJWW2jASSyasPkB+zxLpVwORo+L4c4b3klu7EFRQqD2Yd3BCvdLK4eJL+Rbvb8k0H0p X-Received: by 2002:aa7:858b:: with SMTP id w11-v6mr6483948pfn.77.1542286785973; Thu, 15 Nov 2018 04:59:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542286785; cv=none; d=google.com; s=arc-20160816; b=Pxq52Bf2MCtG1i31ImEsgTJceT6dtaEKvDSUc+QJzXfi0IV5yVZaj6xZB2arnYXY3F h48cHtaJSV5Cdc0q2waRBJfDjDWqIGpQSJgwtFsOSVKlrPOjS8F+Q7jfCEGtp/8NK2Fh AwkWhDFedgbZ/paQWkw6V2ruOIkQVSYcR1BuhtoQCVJ0DkNo4C2n9Z5lR0PnZ/ztVZQK MPBiQGRuCK0he1OJr18B1uuV9O38Fq9ce40u1cCjIUdypZWxGDNeTNyQn9Dz5akxyHbh pEdJe98MIrl4edzSmX/xAHw+sttGRaSKNad7frBQhb7A11ElN+LwISjmAik8PlNtizMb xnYg== 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=c3FvcjGq7BMnEdvo46mzh+pKhG9Sv8BHOuJIgZFPhus=; b=M1N26NidJQUdAsf6RUluOtY0xuqfJjt34o2lkMKly3qrh6AGLdg50vcOSbSIQNMAyw fGU+r5TNbEKV3AlCPt3EzhErajf81G3zzEA8kfmZo5Zl47yRYAluQArBzceXPjsvGXXW W9hBScbZkIjdRzULG1RJJ5/Q/BhX0Lniz4tqW6aYoVc5Ye/V72o6BSEeLQ7uElkJMUZG BW0gRXMoFYp7si93HJXHzq0XKoEBG7/qzV9f8WsWamFT7qXtfYwl5emob0+f3MA9+3a0 7KszTRRrxdXr3a9l2U+A+q71fcwmOti2xotmOKX48Qj7HliR4j15k5W/iB5nFcENEqHC 6qZw== 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 a17si27907418pgv.456.2018.11.15.04.59.29; Thu, 15 Nov 2018 04:59:45 -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 S2388294AbeKOXGX (ORCPT + 99 others); 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) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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.2 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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