Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/iicbus/mux/ltc430x.c
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
#include <dev/ofw/ofw_bus_subr.h> | #include <dev/ofw/ofw_bus_subr.h> | ||||
#include <dev/ofw/openfirm.h> | #include <dev/ofw/openfirm.h> | ||||
static struct ofw_compat_data compat_data[] = { | static struct ofw_compat_data compat_data[] = { | ||||
{"lltc,ltc4305", CHIP_LTC4305}, | {"lltc,ltc4305", CHIP_LTC4305}, | ||||
{"lltc,ltc4306", CHIP_LTC4306}, | {"lltc,ltc4306", CHIP_LTC4306}, | ||||
{NULL, CHIP_NONE} | {NULL, CHIP_NONE} | ||||
}; | }; | ||||
IICBUS_FDT_PNP_INFO(compat_data); | |||||
#endif | #endif | ||||
#include <dev/iicbus/mux/iicmux.h> | #include <dev/iicbus/mux/iicmux.h> | ||||
struct ltc430x_softc { | struct ltc430x_softc { | ||||
struct iicmux_softc mux; | struct iicmux_softc mux; | ||||
bool idle_disconnect; | bool idle_disconnect; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | static device_method_t ltc430x_methods[] = { | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
static devclass_t ltc430x_devclass; | static devclass_t ltc430x_devclass; | ||||
DEFINE_CLASS_1(ltc430x, ltc430x_driver, ltc430x_methods, | DEFINE_CLASS_1(ltc430x, ltc430x_driver, ltc430x_methods, | ||||
sizeof(struct ltc430x_softc), iicmux_driver); | sizeof(struct ltc430x_softc), iicmux_driver); | ||||
DRIVER_MODULE(ltc430x, iicbus, ltc430x_driver, ltc430x_devclass, 0, 0); | DRIVER_MODULE(ltc430x, iicbus, ltc430x_driver, ltc430x_devclass, 0, 0); | ||||
#ifdef FDT | #ifdef FDT | ||||
IICBUS_FDT_PNP_INFO(compat_data); | |||||
DRIVER_MODULE(ofw_iicbus, ltc430x, ofw_iicbus_driver, ofw_iicbus_devclass, 0, 0); | DRIVER_MODULE(ofw_iicbus, ltc430x, ofw_iicbus_driver, ofw_iicbus_devclass, 0, 0); | ||||
#else | #else | ||||
DRIVER_MODULE(iicbus, ltc430x, iicbus_driver, iicbus_devclass, 0, 0); | DRIVER_MODULE(iicbus, ltc430x, iicbus_driver, iicbus_devclass, 0, 0); | ||||
#endif | #endif | ||||
MODULE_DEPEND(ltc430x, iicmux, 1, 1, 1); | MODULE_DEPEND(ltc430x, iicmux, 1, 1, 1); | ||||
MODULE_DEPEND(ltc430x, iicbus, 1, 1, 1); | MODULE_DEPEND(ltc430x, iicbus, 1, 1, 1); | ||||