Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4925255ybv; Mon, 17 Feb 2020 08:33:07 -0800 (PST) X-Google-Smtp-Source: APXvYqy/R78JIEZShj37b13GtQZURTRO08NN+SklZ841MEIY2VEIZXyBYLMwp7l7xyCgSn5gC9mj X-Received: by 2002:a05:6830:1050:: with SMTP id b16mr12959814otp.140.1581957187355; Mon, 17 Feb 2020 08:33:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581957187; cv=none; d=google.com; s=arc-20160816; b=npseXi9liZx/nocKUN3+DIUnQ0Ay6yNix00Mb9OlGOcVaKGwPgSMqvwOXRSHiYjUWH XY2bu9G3i3Js5yElBDy73eJxBI8VZ9kDyzWgtGCneJFO/R6ECfCU2wHCzPMD+2p82QZR q4lj7CX0t97roX62p+DSH5jP8P/AFjof6CnR5xUsCfi2W8+9Qj+UBAnxQUFyjuC7U6Li ibBoiiV0QGwopvoVSwahT+SLbsf47s0gSep8fVehi+ipmk6Z53jKkhbyq3mOEPCj/hop oULBXEkkP4Zd+5ti0OYKrftxZgzm+4emgtSgW0I6nML/H1gVydwJCMjvJ08+/Hu1NyIj sYIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=hBcvIKCG1s+PIQ2K5SV/lgn9pvK1he0cLBDh1l6RMeY=; b=JRQdu1yRwTxX/pdYLog20lB8KfamF6eF7Hu486QrXUEZr5gtdmxMu5pJw9HGe5hmVW ecmHQ2JxUaVbnPI4VBDbUZKTDD24dfwXkOi98EGThdYUmd8Fgzl4LjncR3bJvS/Os3l/ wHNlvI+ji7n2IFVqJCaSD4tlDtPYGj71jYEgISVqxLv0YPAjF7bUf8QMp5L9KKNXBS9f opbG6MnvqPQHbiDqp6hLE29X8IzxF31j/assbGayE7b9O05JVQV2IwdEnjMYo4WhDPkw e9lfLs9sAt5/t2MMv2DfrABvErcHXAh+5ABJjHW9Y3IvuUEmigHVA4ByLco5l8Wlm0Fj x2LA== 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 w23si436931otm.256.2020.02.17.08.32.55; Mon, 17 Feb 2020 08:33:07 -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 S1728737AbgBQQb1 (ORCPT + 99 others); Mon, 17 Feb 2020 11:31:27 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:37337 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727922AbgBQQb1 (ORCPT ); Mon, 17 Feb 2020 11:31:27 -0500 Received: from mail-qt1-f182.google.com ([209.85.160.182]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MNssA-1ioNCn26ki-00OGAh for ; Mon, 17 Feb 2020 17:31:25 +0100 Received: by mail-qt1-f182.google.com with SMTP id w47so12417235qtk.4 for ; Mon, 17 Feb 2020 08:31:25 -0800 (PST) X-Gm-Message-State: APjAAAUjqE8ZK/SN6o5Z9Vwz/rFItc27vaWW0eZoZ3lOuZkJqNe/r0Z9 hSH9G1D7KSlusg1cR2HdeuBy+nN2uWUiIZhx21k= X-Received: by 2002:ac8:1977:: with SMTP id g52mr13579716qtk.18.1581957084396; Mon, 17 Feb 2020 08:31:24 -0800 (PST) MIME-Version: 1.0 References: <20200217155141.08e87b3f@collabora.com> <20200217163622.6c78fa3f@collabora.com> <20200217172309.26697082@collabora.com> In-Reply-To: <20200217172309.26697082@collabora.com> From: Arnd Bergmann Date: Mon, 17 Feb 2020 17:31:08 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC v2 0/4] Introduce i3c device userspace interface To: Boris Brezillon Cc: Vitor Soares , "linux-kernel@vger.kernel.org" , "linux-i3c@lists.infradead.org" , Jose Abreu , Joao Pinto , Wolfram Sang , gregkh , Boris Brezillon , Mark Brown Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:suRVh0DMABCHF5Y/93HhEREtRKP8lcCsn+LHExbJBwq7R4md+Li HHoh69xbA9blE0gVsDJXJo1qtH1ax6GmWFNh426kqFbDc54MI3t1FHo49OTpL1jwg4MU//M 0LDjKfbEUN5EXDdM/KXUUtH0kf/9klqkiEOcPmTSZW8d0nhHfPNQjjTLcvXUsVjPo8Y9rgS s18GkeKDEbKgeAhqIg01g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:QaOfZ6+nneo=:CtVg9+w01Zr7Szb/WEToFo la9+Ve7WHuwaWjJo4/0nG/A3Uj8lutCs6mPkJuGRuz4g0KkK02ZI1/XdfbG1uO6i0ssH7Ji3I ABeA08O/vO6xSzQsk3aV5pVNeJtEyOA3eZJySDl3U8Vgarsfjzak2cTJIJX9kiQrE0PAJ/q65 wsjySo1x1NUEt9BEy0l324P9tT+guLdHnKfVNtGGtPQuczLpdM8/uWd6G8Yyo4eJDJy+wndbj ftbniz+0NvEGj2sdSYTXGWIooLVJuHoLXCvT5slsTayprrPNmADEIEa5qwCOhF89lEPwrcFtZ 3ObDrVIlcAQHbMaY+2rqatV+xEPBeNI98vAYR+VtnFljuvJb2cVF8qtJ1ZiC80CYiGqVhqABL zjHRPZ8IRUNlkLFbgGKdLAXr0RJnhUVgVgv6Hzbo/8pmd8AHQKYo7omMkwp44SchmrAd6aiBb NKZYvqNDsSSYvPS9Z+zlv0pfAAz0ci0Qz3MTZCCyepXWL+Scn5F4e8OVJRwNMU+E+bCFqWCcI FNpGTfFINS2zIovMftyvC6RrbqS5r0Ki7mtTB5JTGvbuP0ohtNl+yyYmxeO130eRePgpJ/w9t tZYCHu0VQaGXXjL2HiQ9QI8XOYrxHgLeBvIIqyC0hj120+uuieDJI5WYVT1S/6xAEWH5n0wg1 wZWjp5u+2W/PMQml+aCp/ITGSWkfPfxzQf9e+chxHbKVwJ5Je0aynlqmhkNI9jIaqkWXxsN4A 5Sis6K/jXBLkqmACy6MU/HagIxHH+HMma4lsEs4c4GmHKKO5UEbkOyCSxgUDYLzcabhmY6cw9 fK3PhTPlHzQWQ2A+Wz0yPcXt7/WdZ41HiQQZu4FR3jOa7YlK/U= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 17, 2020 at 5:23 PM Boris Brezillon wrote: > On Mon, 17 Feb 2020 15:55:08 +0000 Vitor Soares wrote: > > Okay, I have clearly not read the code carefully enough. I thought you > were declaring a new i3c_device_driver and were manually binding all > orphan devices to this driver. Looks like the solution is more subtle > than that, and i3cdevs are actually subdevices that are automatically > created/removed when the I3C device is unbound/bound. That means the > 'on-demand driver loading' logic is not impacted by this new layer. I'm > still not convinced this is needed (I expect i3cdev to be used mostly > for experiment, and in that case, having a udev rule, or manually > binding the device to the i3cdev driver shouldn't be a problem). I'm fairly sure it's not needed, other approaches could be used to provide user space access, but it's not clear if any other way is better either. It also took me a while to figure out what is going on when I read the code. One thought that I had was that this could be better integrated into the core, with user space being there implicitly through sysfs rather than a /dev file. > I'm also not sure what happens if the device is still used when > i3cdev_detach() is called, can transfers still be done after the device > is attached to its in-kernel driver? I think this is still an open issue that I also pointed out. The driver binding/unbinding and user space access definitely needs to be properly serialized, whichever method is used to implement the user access. Arnd