Index | Thread | Search

From:
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject:
Re: add iic_detach() to iic driver, for USB/IIC adapters
To:
Denis Bodor <dbodor@lefinnois.net>
Cc:
tech@openbsd.org
Date:
Wed, 11 Sep 2024 16:57:41 +0200

Download raw body.

Thread
> Date: Sun, 8 Sep 2024 09:55:01 +0200
> From: Denis Bodor <dbodor@lefinnois.net>
> 
> On Sat, Sep 07, 2024 at 12:54:08PM GMT, Denis Bodor wrote:
> > But the iic driver doesn't implement iic_detach() and so config_detach()
> > in my driver panics the kernel with the message: "forced detach of iic1
> > failed". So I added a few lines to i2c.c. What do you think?
> 
> My USB driver is starting to work properly and I realise that the drivers
> for the child devices of the new iic bus (such as spdmem) must also all
> implement their _detach() function.
> 
> 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.