Index | Thread | Search

From:
Janne Johansson <icepic.dz@gmail.com>
Subject:
Re: add iic_detach() to iic driver, for USB/IIC adapters
To:
Denis Bodor <dbodor@lefinnois.net>
Cc:
Mark Kettenis <mark.kettenis@xs4all.nl>, tech@openbsd.org
Date:
Thu, 12 Sep 2024 08:26:58 +0200

Download raw body.

Thread
> > > This impacts a lot more code than I had originally thought.
> > > I wonder if this is a good idea after all...
> > Yes, not sure about this one.  The iic(4) bus itself does not support
> > hotplugging and USB iic(4) controllers are somewhat of a rare toy I
> > guess.
>
> I know of two, the I2C-Tiny-USB project and the CP2112 controller...
> I think this is only really useful if a /dev/iic-n is made available to
> allow the buses to be used from user space.
>
> There is the beginnings of such an implementation in i2c_io.h
> (JI2C_IOCTL_EXEC behind a ‘#ifdef notyet’ ) but this code has been around
> since 2004. Is this something desirable (notyet == tobedone) or is
> the OpenBSD philosophy to keep access to i2c devices strictly in kernel
> space?

There is some information in this thread

https://marc.info/?l=openbsd-tech&m=164510604215263&w=2

about the feelings from the project to just randomly allow access to
all kinds of gpio pins a board can expose. I don't know if i2c devices
generally control equally "dangerous" parts on motherboards and sbcs,
but if they do, then some restraint might be in order.

Now, this i2c behind usb would presumably not be connected to
something the computer owner would not want to allow programmatic
access to, but the previous non-detachable i2c buses might have been.

--
May the most significant bit of your life be positive.