Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/iicbus/ads111x.c
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | static struct ofw_compat_data compat_data[] = { | ||||
{"ti,ads1013", (uintptr_t)&ads111x_chip_infos[0]}, | {"ti,ads1013", (uintptr_t)&ads111x_chip_infos[0]}, | ||||
{"ti,ads1014", (uintptr_t)&ads111x_chip_infos[1]}, | {"ti,ads1014", (uintptr_t)&ads111x_chip_infos[1]}, | ||||
{"ti,ads1015", (uintptr_t)&ads111x_chip_infos[2]}, | {"ti,ads1015", (uintptr_t)&ads111x_chip_infos[2]}, | ||||
{"ti,ads1113", (uintptr_t)&ads111x_chip_infos[3]}, | {"ti,ads1113", (uintptr_t)&ads111x_chip_infos[3]}, | ||||
{"ti,ads1114", (uintptr_t)&ads111x_chip_infos[4]}, | {"ti,ads1114", (uintptr_t)&ads111x_chip_infos[4]}, | ||||
{"ti,ads1115", (uintptr_t)&ads111x_chip_infos[5]}, | {"ti,ads1115", (uintptr_t)&ads111x_chip_infos[5]}, | ||||
{NULL, (uintptr_t)NULL}, | {NULL, (uintptr_t)NULL}, | ||||
}; | }; | ||||
IICBUS_FDT_PNP_INFO(compat_data); | |||||
#endif | #endif | ||||
struct ads111x_softc { | struct ads111x_softc { | ||||
device_t dev; | device_t dev; | ||||
struct sx lock; | struct sx lock; | ||||
int addr; | int addr; | ||||
int cfgword; | int cfgword; | ||||
const struct ads111x_chipinfo | const struct ads111x_chipinfo | ||||
▲ Show 20 Lines • Show All 440 Lines • ▼ Show 20 Lines | |||||
static driver_t ads111x_driver = { | static driver_t ads111x_driver = { | ||||
"ads111x", | "ads111x", | ||||
ads111x_methods, | ads111x_methods, | ||||
sizeof(struct ads111x_softc), | sizeof(struct ads111x_softc), | ||||
}; | }; | ||||
static devclass_t ads111x_devclass; | static devclass_t ads111x_devclass; | ||||
DRIVER_MODULE(ads111x, iicbus, ads111x_driver, ads111x_devclass, NULL, NULL); | DRIVER_MODULE(ads111x, iicbus, ads111x_driver, ads111x_devclass, NULL, NULL); | ||||
#ifdef FDT | |||||
IICBUS_FDT_PNP_INFO(compat_data); | |||||
#endif | |||||
MODULE_VERSION(ads111x, 1); | MODULE_VERSION(ads111x, 1); | ||||
MODULE_DEPEND(ads111x, iicbus, 1, 1, 1); | MODULE_DEPEND(ads111x, iicbus, 1, 1, 1); |