Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2330545ybv; Mon, 24 Feb 2020 03:25:10 -0800 (PST) X-Google-Smtp-Source: APXvYqz6wrXWu/Q1zJsRqSf5hGg+pbfvXsL+Fr4VKNfRRdAfTEp+OJtUd22iHpgYPe75EBTFZdWI X-Received: by 2002:a9d:6548:: with SMTP id q8mr37945724otl.356.1582543510139; Mon, 24 Feb 2020 03:25:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582543510; cv=none; d=google.com; s=arc-20160816; b=pYDRy2UeBHYKPIfM1TPnousOe270dW3ghvO65UqpqcB8X7qmCoAHRx/MN0M6FqwzUl i+85BJN5WnWcsQZgLbuvcjiUlqoHKKPZTtRDoqd7JjqMIbmAXdpgOc1Dh7rI1/fbSNRL GB3+kntSHd3PJqfhNpnXO3GBgMR0dwRE11jrjqchpdx/3DtVKiPqbN3P05umkqEKgXOS CUPfATQIOt/F7838T8arTkNEO/GYxeBq7oLYizYCw0NStNqVOHdLciQwu3p9SOWFByNQ xdtz6WBwWjX/ZJccjJklnAqs+w+rz/gKwmcGo23Tl5iLoW8+FI/qkbJnSaqd3NFxvM2/ irjQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=L9Ty5xInWN4vPaffEFiiApI4o7fIMhdxbhg/U9EyzBs=; b=aBH5baq0Ho60wCUojz4GrQOdnU3VllYGH6NiWTHqN0G0SWEKwYPEtm/dCR9/x9sMwR fajiDzHVKkl+Jqx5qUtK/Vi6ZsOEzBMOsJggLJl8/9sxFtgcf9dNhAwuB+WvNg61MTzt vtbnXUQL6ontCWb1MD820EODK7+A+FrroLNsQI4VwT+VGTnuOeWiMuMGEEDeVkKxYhvh Du/I+THTFUUxtLx3Tvjw5Lf7nqhsKtgdreONfnles4agpGcNBW3CqAUuUFXKFmpOUw9b oSzAXEclK0ko+tmqFkmNCSJOp0D5ItiXCWLXX5GkDHI3KmY7AWvRUtdTokK8S5D2KJ3I entw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z199si4423502oia.192.2020.02.24.03.24.56; Mon, 24 Feb 2020 03:25:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727240AbgBXLYr (ORCPT + 99 others); Mon, 24 Feb 2020 06:24:47 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:54156 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbgBXLYq (ORCPT ); Mon, 24 Feb 2020 06:24:46 -0500 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 13F10292B4E; Mon, 24 Feb 2020 11:24:45 +0000 (GMT) Date: Mon, 24 Feb 2020 12:24:42 +0100 From: Boris Brezillon To: Vitor Soares Cc: "bbrezillon@kernel.org" , Joao Pinto , Jose Abreu , "gregkh@linuxfoundation.org" , "wsa@the-dreams.de" , "arnd@arndb.de" , "broonie@kernel.org" , "corbet@lwn.net" , "linux-kernel@vger.kernel.org" , "linux-i3c@lists.infradead.org" Subject: Re: [PATCH v3 0/5] Introduce i3c device userspace interface Message-ID: <20200224122442.7cb6e8d8@collabora.com> In-Reply-To: References: <20200219091658.7506e7bd@collabora.com> <20200221184116.1d8f0677@collabora.com> Organization: Collabora X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-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 On Mon, 24 Feb 2020 10:53:25 +0000 Vitor Soares wrote: > Hi Boris, > > From: Boris Brezillon > Date: Fri, Feb 21, 2020 at 17:41:16 > > > > > > > > > > > I want to make you know that none of your previous comments was ignored > > > > > and I would like to start the discussion from this point. > > > > > > > > Sure, np. I'll probably wait for a v4 exploring the option I proposed > > > > then. > > > > > > I would like to check with you: > > > - How can we prioritize the device driver over the i3cdev driver if the > > > driver is loaded after i3cdev? Currently, this is done automatically > > > without any command, and for me, this is a requirement. > > > > No devs would be bound to the i3cdev driver by default, it would have > > to be done explicitly through a sysfs knob. Which makes me realize > > we can't use the generic bind knob since it doesn't let the subsystem > > know that it's a manual bind. I thought there was a way to distinguish > > between manual and auto-bind. > > > > > - For the ioctl command structure, there is no rule about the way I did > > > or what you proposed, both are currently used in the kernel. For me it is > > > one more structure to deal with, can you point the advantages of your > > > purpose? > > > > I don't have a strong opinion on that one, though I find it a bit > > easier to follow when the number of xfers is encoded in a separate > > struct rather than extracted from the data size passed through the cmd > > argument. > > I will change it then. Do you have any suggestion for the naming to keep > it short? I named it i3cdev_priv_xfers in the patch I sent, but you can pick a different name if you don't like this one. > > > > > > - Regarding the ioctl codes, I tried to use those after I2C. > > > > Why start from 0x30? It doesn't make sense to me. Just because you base > > your code on something that already exists doesn't mean you have to > > copy all of it. > > I might be wrong but last I2C command is 0x20 and I tried to let some > free space in case they need. > Also I think that make sense I2C and I3C share the same 'magic number'. Hm, I'm not sure that's a good idea. The set of ioctls for I2C and I3C are likely to be completely different, so I'd recommend using a separate namespace (AKA ioctl magic number). Wolfram, any opinion? > > BTW, in ioctl-numbers documentation there is no reference for code 0x07. Indeed, looks like it's not documented.