svn commit: r348166 - head/sys/arm/freescale/imx
Ian Lepore
ian at FreeBSD.org
Thu May 23 14:21:24 UTC 2019
Author: ian
Date: Thu May 23 14:21:23 2019
New Revision: 348166
URL: https://svnweb.freebsd.org/changeset/base/348166
Log:
Release the bus-recovery gpio pins in detach(), so that unload then
reload of the module works without "pin already allocated" errors.
Modified:
head/sys/arm/freescale/imx/imx_i2c.c
Modified: head/sys/arm/freescale/imx/imx_i2c.c
==============================================================================
--- head/sys/arm/freescale/imx/imx_i2c.c Thu May 23 14:05:42 2019 (r348165)
+++ head/sys/arm/freescale/imx/imx_i2c.c Thu May 23 14:21:23 2019 (r348166)
@@ -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);
More information about the svn-src-head
mailing list