Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp791637ybl; Wed, 11 Dec 2019 07:34:32 -0800 (PST) X-Google-Smtp-Source: APXvYqya/HMLEtml7wkNkJCXhtxnnkzthrC8GueFHErvxsDoCKOn+SyVNsm+mJwJ0lYWYGL/Typ6 X-Received: by 2002:aca:f495:: with SMTP id s143mr3122445oih.118.1576078471942; Wed, 11 Dec 2019 07:34:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576078471; cv=none; d=google.com; s=arc-20160816; b=Gw1TbLd1KUsIhRuMjJlGC2Vl8SWm4kBW+t19nOAhOVuxi4BxkInf/q9+yQAn88IN71 unrf/19KWuOIX/Z1QWC2liTp400COb7wnm2AQ1r2BTcefft9pL4dW6wgrMPHN9KWQbin lLSe9KFcIzkJFHE4l1pJNVbQE56AXT+jFDjMjk7PO5x3fzpSsbq8gXacFj1ziBH/NQmF rTPqOmHu/NDGqu3jxtymjXhAx2WlU8yJB0Pg0zaZUGzMOrUiDq1a7Ds94L7IfZ4KTcPX b7KZeLPqGjc5o/MCYmmt0IubtBlMh6wVuFvkR0yjNVYZiiygYFwmyBlz17h0OOF9Moho 6qgQ== 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=OQwVqZ9wRyKBnhXFYBGE6+qswko4/R8a4aeoaJXTHFY=; b=EcE5MWmBOa7k+cdbO4PWBYXuofMIIZZOiF4iA2eHp2Gu+0FPyMTVZiwOoOmwrAWVjN aEVTYfFMGM4ioxSkrTKZ6d6gc30MOm6u3NLQk/QJavqzsG3Byu30F0it03/9hBYY5IQ/ aud3AjcGDBfZ4LSwmOXLZLPaFmjwhne+o8LmVDYYdePtfiUqo1hFuHbAA1n2LaERZjHc EZLBPZpGR+7OUINA/j5IYmPUmJNiszvqFMhD+/A2qDzXR8ZDOeE4S3weF7W28/9+86Iy a3SET4EPZ6WOy47+K3YV3daQJrRQRHq2E6FnkKqaA8cS17+XRcfYLtQeeTCOJ7kVIjoL ZEDA== 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 b10si1057354oib.205.2019.12.11.07.34.19; Wed, 11 Dec 2019 07:34:31 -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 S2388083AbfLKPdx (ORCPT + 99 others); Wed, 11 Dec 2019 10:33:53 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:40051 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730954AbfLKPdn (ORCPT ); Wed, 11 Dec 2019 10:33:43 -0500 Received: from mail-qk1-f179.google.com ([209.85.222.179]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id 1M8QiW-1iagGz3r5U-004So9 for ; Wed, 11 Dec 2019 16:33:42 +0100 Received: by mail-qk1-f179.google.com with SMTP id a203so9852840qkc.3 for ; Wed, 11 Dec 2019 07:33:41 -0800 (PST) X-Gm-Message-State: APjAAAUfwHqUwyRjRLa0V8vUcSrNdYTKsyuJsRftKD+spi9pkAz4Zijb U1G+5jfGL0+5nJPVPJH6L377omzNs6G4n8TfCjA= X-Received: by 2002:a37:4e4e:: with SMTP id c75mr3368164qkb.3.1576078420833; Wed, 11 Dec 2019 07:33:40 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Wed, 11 Dec 2019 16:33:24 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 5/5] i3c: add i3cdev module to expose i3c dev in /dev To: Vitor Soares Cc: "linux-kernel@vger.kernel.org" , "linux-i3c@lists.infradead.org" , Joao Pinto , Boris Brezillon , gregkh , Wolfram Sang , Mark Brown Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:HwUutlWxhi/qNhj6rzdE4KlUvk+XYIo6tvEYWzJJ8njRHPRPTpX piC+yOdBKynS5m+VAUeKRvMHoFhIcR0H+A2WBbf/V/X4Kp4wP//ixA9/wQQgMgwqsxvJGZC rtC/qgtOFhSVDNi2dCq7qmGlILFet/r/Embr7DPz7S+nebMJu1IWfVqFT2KrTdd8lWf7ujn tqvhLw43GEk+U0IUWmgJw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bwReUF5jPXo=:S37LbxcmkNXcwIj7f5cNTz tFGPBMRz+9fg6GrR+bpa5B0h9d46tElGfLzVLrBVIpauKyKi8tpNGzxKt4tKnh+/DnMcWJ2QB rLp+DzbJO9VcASf2A1TGkVrxSX79H9YF5cPlaR36s9Fa7kmyA6FE5CfgsFSz/JgQjJ0dtSySN PBb9PnaR62Rw0yaR/RYQB/TAHXDAK6FnV6uHb2WuoXdPcu4B5pN3kK8cXifEI6RCzTgJe+On9 NYI7WD6PoIis07NA8NXYydGNSA+pwU38DRu6fPSEIb32gJjK8z5HmZgoJHvp6vVFXwrSuopEC Z8Xwe8HGb1CCeJ/jlE7/gv1axExC5Se0x5SBREW/MzTVsVdjESlD/L2TVREQOlbaPoq/Kwh8D QvZqvuGI/pC4uzgGgNBX4PsfWI3cs9APrx32sJh3O04kaaKybVmyAoaolLf/DWfWxcakAP0fm 42FW5Z06S1qRMDmF/r6PHh7SsLXTlB66OoVfWNL7a4Lgpy7xza+qKk632cOrwL12Brf2l3cMD Aq+fEDDaQsbMWDfbyWczAxoTlftyiIzuxyhXbcARJIVbs+6mjt0Q6yHgSqYTXIAo+S/QfS2O5 TR2cSD+FJJHiCRV14Fguf9n7W8bMvDxrU3b4sb31fLEiG/mM/44d2o0OzM8/FLKmeCK0UwhEc 6Uf+PI8weWhqfk23KjYSDjX0j5jfynD1CWbmcn3FID3mHADy2YiGFbRgI1MYo74mS8Widinz+ KJ7Mn30qxUxi51igy8DsZiCYnP6dp5awOR03M+iAcG5KXqNq+0PH+2grehZZbaMhNC5J5oTAH xsvoV9vcRDJJ9f8V1voYjEcM/dXQ+HRqEPpcLAebt0yT3plJjot6cs9Sts7FMazEgE3Z009Jz g7H89ldDqBIvB62BhxSw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 11, 2019 at 4:07 PM Vitor Soares wrote: > From: Arnd Bergmann > Date: Tue, Dec 10, 2019 at 19:37:14 > > On Tue, Dec 10, 2019 at 8:15 PM Vitor Soares wrote: > > > From: Arnd Bergmann > > > Date: Tue, Dec 10, 2019 at 17:51:14 > > > > On Tue, Dec 10, 2019 at 4:37 PM Vitor Soares wrote: > > As your interface is basically just read/write based, I wonder > > if there is a way to completely avoid the ioctl and instead > > use io_submit() as the primary interface. > > I confess that I wasn't familiar with io_submit() until now and went > straightway for the ioctl() approach. > So far, my understanding is that io_submit() will call .write or .read of > i3cdev module depending on the iocb command. if so, we won't be able to > do a repeated start between a multiple iocb in the same list, right? I'm not sure what you mean with "repeated start", but it's definitely possible that io_submit() is not a useful interface for i3c. The main advantage would be that it avoids creating a complex ioctl command. > Apart from this private read/write need, another requirement that leads > me to use the ioctl() was: > - When we support HDR command in i3c subsystem we can expand the ioctl() > command to support it. > - For now, device API doesn't expose CCC commands but some of them are > used for a private contract between master and device and we likely need > that support in the future as well. I think you could still have both the io_submit() interface for basic I/O (if you can get it to do what you want), plus an ioctl interface for more complex interactions. Arnd