bus_generic_detach: Delete children after detaching themThis provides better semantics as a standalone DEVMETHOD fordevice_attach as bus drivers should remove child devices they createdas part of
bus_generic_detach: Delete children after detaching themThis provides better semantics as a standalone DEVMETHOD fordevice_attach as bus drivers should remove child devices they createdas part of detach cleanup. The implementation callsbus_detach_children() first to permit child devices an opportunity toveto the detach operation. If that succeeds, device_delete_children()is used to delete the child devices.This requires fixing various drivers that were deleting devicesexplicitly (via a device_t pointer cached in the softc) after callingbus_generic_detach to stop doing that and just rely onbus_generic_detach to remove child devices.Reviewed by: impDifferential Revision: https://reviews.freebsd.org/D47959
show more ...
Replace calls to bus_generic_attach with bus_attach_childrenReviewed by: impDifferential Revision: https://reviews.freebsd.org/D47675
newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYSponsored by: Netflix
rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOPTested with max44009(4).MFC after: 2 weeks
rk_i2c: emulate repeated startrk_i2c_send_stop is modified so that it sends a stop condition, like italways did, if there is no IIC_M_NOSTOP flag.But if the flag is set then the function complete
rk_i2c: emulate repeated startrk_i2c_send_stop is modified so that it sends a stop condition, like italways did, if there is no IIC_M_NOSTOP flag.But if the flag is set then the function completely resets the controlregister and sets the driver state to transfer completed.Something like this was previously done for a write with IIC_M_NOSTOP.Now it is done for a read with IIC_M_NOSTOP as well.Linux code says that the hardware does not support the repeated startcondition and the documentation, indeed, does not mention it.But according to the Linux driver clearing the control register and thensending a start condition acts as if it were a repeated start.While here, add braces around a single-line 'if' branch to balance itwith a multi-line 'else' branch.Tested with max44009(4).MFC after: 2 weeks
clk: Move clock code in dev/clkWe've removed kernel option EXT_RESOURCES almost two years ago.While it was ok to have some code under a common 'extres' subdirectoryat first, we now have a lot of
clk: Move clock code in dev/clkWe've removed kernel option EXT_RESOURCES almost two years ago.While it was ok to have some code under a common 'extres' subdirectoryat first, we now have a lot of consumer of it and we made it mandatoryso no need to have it under a cryptic name.Reviewed by: mhorneSponsored by: Beckhoff Automation GmbH & Co. KGDifferential Revision: https://reviews.freebsd.org/D43191
iicbus: Move rockchip driver into the common directoryNo need to keep it under sys/arm64/rockchipIt's easier to find which controller we support by looking under one directory.While here remove t
iicbus: Move rockchip driver into the common directoryNo need to keep it under sys/arm64/rockchipIt's easier to find which controller we support by looking under one directory.While here remove the condition on SOC option, device rk_i2c is enough as allRockchip SoC that we support have this controller.Sponsored by: Beckhoff Automation GmbH & Co. KGDifferential Revision: https://reviews.freebsd.org/D43184