All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Pathak, Asutosh" <asutosh.pathak@linux.intel.com>
Cc: Frank.Li@nxp.com, Frank.li@oss.nxp.com,
	linux-i3c@lists.infradead.org, linux-usb@vger.kernel.org
Subject: Re: [RFC] i3c: USB-I3C (class 0x3C) master + userspace access - which way do you want it?
Date: Fri, 13 Nov 2026 00:35:13 +0100	[thread overview]
Message-ID: <202611122335131c454ddf@mail.local> (raw)
In-Reply-To: <087d879a-e8fd-402f-b8d2-2531244ff69f@linux.intel.com>

On 12/11/2026 15:22:44-0800, Pathak, Asutosh wrote:
> Hi Alexandre,
> 
> Before I send a real series I want to settle one design question, because the
> answer decides whether half of this is even worth submitting.
> 
> We have an out-of-tree driver for the USB-I3C device class (USB class 0x3C) - a
> USB device that bridges the host to an I3C bus. It's two modules:
> 
>  - a controller driver: USB class driver that also calls i3c_master_register()
>    and implements the usual master ops (do_daa, send_ccc_cmd, priv xfers, IBI).
>    It's a normal I3C master that just happens to talk over USB. I think this
>    belongs in drivers/i3c/master/ and goes upstream the usual way.
> 
>  - a target driver: binds the I3C devices behind it and hands a char dev +
>    ioctls to userspace (OpenIPC and similar tools) so they can drive the bus.
> 
> The whole reason this hardware exists is userspace-driven I3C from a host PC.
> But as far as I can tell the I3C subsystem has no userspace interface at all -
> no i3c-dev, no uapi header - so anything we add there is new ABI you'd have to
> live with. Hence the RFC instead of a patch bomb.
> 
> So, which of these do you want?
> 
>  a) nothing in userspace upstream - we only send the master, keep the ioctls
>     out of tree.
>  b) a generic i3c-dev (like i2c-dev), proper include/uapi/linux/i3c-dev.h,
>     usable by any master. Happy to do it, but I'm not going to design that ABI
>     without you on board.
>  c) what we already have: the controller stays a pure master with no userspace
>     ABI, and the target side is a normal I3C device driver (drivers/i3c/device.c)
>     where each bound target exposes its own char dev + ioctl and reaches the bus
>     through the standard priv-xfer path. It's the least churn for us and matches
>     our architecture doc - so if you're fine with a per-target ioctl node living
>     inside the USB-I3C driver (not a generic subsystem ABI), we'll run with it.
> 
> I'll build whichever one you pick.
> 
> Rough plan either way: master in drivers/i3c/master/ first (useful on its own,
> no userspace ABI), then the userspace piece separately, then docs + MAINTAINERS.
> 
> Mainly I'd like your call on (a)/(b)/(c), and confirmation that a USB-transport
> master is OK in drivers/i3c/master/. For what it's worth (c) is our preference,
> since it's already working and keeps the ABI contained. Would rather get this
> right now than argue about it at v3.
> 

USB-transport master is not an issue and you can submit it. For the
i3c-dev related question, you should probably have a look at the current
threads so you can add your use case:

https://lore.kernel.org/linux-i3c/ati3c2JBNLGRnPen@ashevche-desk.local/T/#mb42d9b2785f8508d39eaf782b3d29189226b8029

https://lore.kernel.org/linux-i3c/20260911210935.1353126-1-meaganlloyd@linux.microsoft.com/

Regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Pathak, Asutosh" <asutosh.pathak@linux.intel.com>
Cc: Frank.Li@nxp.com, Frank.li@oss.nxp.com,
	linux-i3c@lists.infradead.org, linux-usb@vger.kernel.org
Subject: Re: [RFC] i3c: USB-I3C (class 0x3C) master + userspace access - which way do you want it?
Date: Fri, 13 Nov 2026 00:35:13 +0100	[thread overview]
Message-ID: <202611122335131c454ddf@mail.local> (raw)
In-Reply-To: <087d879a-e8fd-402f-b8d2-2531244ff69f@linux.intel.com>

On 12/11/2026 15:22:44-0800, Pathak, Asutosh wrote:
> Hi Alexandre,
> 
> Before I send a real series I want to settle one design question, because the
> answer decides whether half of this is even worth submitting.
> 
> We have an out-of-tree driver for the USB-I3C device class (USB class 0x3C) - a
> USB device that bridges the host to an I3C bus. It's two modules:
> 
>  - a controller driver: USB class driver that also calls i3c_master_register()
>    and implements the usual master ops (do_daa, send_ccc_cmd, priv xfers, IBI).
>    It's a normal I3C master that just happens to talk over USB. I think this
>    belongs in drivers/i3c/master/ and goes upstream the usual way.
> 
>  - a target driver: binds the I3C devices behind it and hands a char dev +
>    ioctls to userspace (OpenIPC and similar tools) so they can drive the bus.
> 
> The whole reason this hardware exists is userspace-driven I3C from a host PC.
> But as far as I can tell the I3C subsystem has no userspace interface at all -
> no i3c-dev, no uapi header - so anything we add there is new ABI you'd have to
> live with. Hence the RFC instead of a patch bomb.
> 
> So, which of these do you want?
> 
>  a) nothing in userspace upstream - we only send the master, keep the ioctls
>     out of tree.
>  b) a generic i3c-dev (like i2c-dev), proper include/uapi/linux/i3c-dev.h,
>     usable by any master. Happy to do it, but I'm not going to design that ABI
>     without you on board.
>  c) what we already have: the controller stays a pure master with no userspace
>     ABI, and the target side is a normal I3C device driver (drivers/i3c/device.c)
>     where each bound target exposes its own char dev + ioctl and reaches the bus
>     through the standard priv-xfer path. It's the least churn for us and matches
>     our architecture doc - so if you're fine with a per-target ioctl node living
>     inside the USB-I3C driver (not a generic subsystem ABI), we'll run with it.
> 
> I'll build whichever one you pick.
> 
> Rough plan either way: master in drivers/i3c/master/ first (useful on its own,
> no userspace ABI), then the userspace piece separately, then docs + MAINTAINERS.
> 
> Mainly I'd like your call on (a)/(b)/(c), and confirmation that a USB-transport
> master is OK in drivers/i3c/master/. For what it's worth (c) is our preference,
> since it's already working and keeps the ABI contained. Would rather get this
> right now than argue about it at v3.
> 

USB-transport master is not an issue and you can submit it. For the
i3c-dev related question, you should probably have a look at the current
threads so you can add your use case:

https://lore.kernel.org/linux-i3c/ati3c2JBNLGRnPen@ashevche-desk.local/T/#mb42d9b2785f8508d39eaf782b3d29189226b8029

https://lore.kernel.org/linux-i3c/20260911210935.1353126-1-meaganlloyd@linux.microsoft.com/

Regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  reply	other threads:[~2026-11-12 23:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 23:22 [RFC] i3c: USB-I3C (class 0x3C) master + userspace access - which way do you want it? Pathak, Asutosh
2026-11-12 23:22 ` Pathak, Asutosh
2026-11-12 23:35 ` Alexandre Belloni [this message]
2026-11-12 23:35   ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202611122335131c454ddf@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=Frank.Li@nxp.com \
    --cc=Frank.li@oss.nxp.com \
    --cc=asutosh.pathak@linux.intel.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.