Release the bus-recovery gpio pins in detach(), so that unload then
reload of the module works without "pin already allocated" errors.
This commit is contained in:
parent
d0ba99d943
commit
ecb53c096d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348166
@ -469,6 +469,10 @@ i2c_detach(device_t dev)
|
||||
if (sc->iicbus != NULL)
|
||||
device_delete_child(dev, sc->iicbus);
|
||||
|
||||
/* Release bus-recover pins; gpio_pin_release() handles NULL args. */
|
||||
gpio_pin_release(sc->rb_sclpin);
|
||||
gpio_pin_release(sc->rb_sdapin);
|
||||
|
||||
if (sc->res != NULL)
|
||||
bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->res);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user