Linux USB
 help / color / mirror / Atom feed
From: "Pathak, Asutosh" <asutosh.pathak@linux.intel.com>
To: alexandre.belloni@bootlin.com
Cc: Frank.Li@nxp.com, Frank.li@oss.nxp.com,
	linux-i3c@lists.infradead.org, linux-usb@vger.kernel.org
Subject: [RFC] i3c: USB-I3C (class 0x3C) master + userspace access - which way do you want it?
Date: Thu, 12 Nov 2026 15:22:44 -0800	[thread overview]
Message-ID: <087d879a-e8fd-402f-b8d2-2531244ff69f@linux.intel.com> (raw)

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.

Thanks,
Asutosh

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 23:22 Pathak, Asutosh [this message]
2026-11-12 23:35 ` [RFC] i3c: USB-I3C (class 0x3C) master + userspace access - which way do you want it? 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=087d879a-e8fd-402f-b8d2-2531244ff69f@linux.intel.com \
    --to=asutosh.pathak@linux.intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=Frank.li@oss.nxp.com \
    --cc=alexandre.belloni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox