FreeBSD kernel IICBUS device code
|
#include <sys/_lock.h>
#include <sys/_mutex.h>
Go to the source code of this file.
Data Structures | |
struct | iicbus_softc |
struct | iicbus_ivar |
Macros | |
#define | IICBUS_IVAR(d) (struct iicbus_ivar *) device_get_ivars(d) |
#define | IICBUS_SOFTC(d) (struct iicbus_softc *) device_get_softc(d) |
#define | IICBUS_ACCESSOR(A, B, T) __BUS_ACCESSOR(iicbus, A, IICBUS, B, T) |
#define | IICBUS_LOCK(sc) mtx_lock(&(sc)->lock) |
#define | IICBUS_UNLOCK(sc) mtx_unlock(&(sc)->lock) |
#define | IICBUS_ASSERT_LOCKED(sc) mtx_assert(&(sc)->lock, MA_OWNED) |
#define | IICBUS_FDT_PNP_INFO(t) |
#define | IICBUS_ACPI_PNP_INFO(t) |
Enumerations | |
enum | { IICBUS_IVAR_ADDR } |
Functions | |
int | iicbus_generic_intr (device_t dev, int event, char *buf) |
void | iicbus_init_frequency (device_t dev, u_int bus_freq) |
int | iicbus_attach_common (device_t dev, u_int bus_freq) |
device_t | iicbus_add_child_common (device_t dev, u_int order, const char *name, int unit, size_t ivars_size) |
int | iicbus_detach (device_t dev) |
void | iicbus_probe_nomatch (device_t bus, device_t child) |
int | iicbus_read_ivar (device_t bus, device_t child, int which, uintptr_t *result) |
int | iicbus_write_ivar (device_t bus, device_t child, int which, uintptr_t value) |
int | iicbus_child_location (device_t bus, device_t child, struct sbuf *sb) |
int | iicbus_child_pnpinfo (device_t bus, device_t child, struct sbuf *sb) |
Variables | |
driver_t | iicbus_driver |
devclass_t | iicbus_devclass |
driver_t | ofw_iicbus_driver |
devclass_t | ofw_iicbus_devclass |
driver_t | acpi_iicbus_driver |
#define IICBUS_ACCESSOR | ( | A, | |
B, | |||
T | |||
) | __BUS_ACCESSOR(iicbus, A, IICBUS, B, T) |
#define IICBUS_ASSERT_LOCKED | ( | sc | ) | mtx_assert(&(sc)->lock, MA_OWNED) |
#define IICBUS_IVAR | ( | d | ) | (struct iicbus_ivar *) device_get_ivars(d) |
#define IICBUS_SOFTC | ( | d | ) | (struct iicbus_softc *) device_get_softc(d) |
device_t iicbus_add_child_common | ( | device_t | dev, |
u_int | order, | ||
const char * | name, | ||
int | unit, | ||
size_t | ivars_size | ||
) |
Definition at line 226 of file iicbus.c.
References dev, and iicbus_ivar::rl.
Referenced by acpi_iicbus_add_child(), and iicbus_add_child().
int iicbus_attach_common | ( | device_t | dev, |
u_int | bus_freq | ||
) |
Definition at line 96 of file iicbus.c.
References addr, iicbus_softc::bus_freq, iicbus_softc::dev, dev, IIC_FASTEST, iicbus_init_frequency(), iicbus_reset, IICBUS_SOFTC, iicbus_softc::lock, and iicbus_softc::strict.
Referenced by acpi_iicbus_attach(), and iicbus_attach().
int iicbus_child_location | ( | device_t | bus, |
device_t | child, | ||
struct sbuf * | sb | ||
) |
Definition at line 180 of file iicbus.c.
References iicbus_ivar::addr, and IICBUS_IVAR.
Referenced by acpi_iicbus_child_location().
int iicbus_child_pnpinfo | ( | device_t | bus, |
device_t | child, | ||
struct sbuf * | sb | ||
) |
Definition at line 189 of file iicbus.c.
Referenced by acpi_iicbus_child_pnpinfo().
int iicbus_detach | ( | device_t | dev | ) |
Definition at line 144 of file iicbus.c.
References dev, IIC_FASTEST, iicbus_reset, IICBUS_SOFTC, and iicbus_softc::lock.
Referenced by acpi_iicbus_detach().
int iicbus_generic_intr | ( | device_t | dev, |
int | event, | ||
char * | buf | ||
) |
void iicbus_init_frequency | ( | device_t | dev, |
u_int | bus_freq | ||
) |
Definition at line 301 of file iicbus.c.
References iicbus_softc::bus_freq, dev, and IICBUS_SOFTC.
Referenced by iicbus_attach_common(), and ofw_iicbus_attach().
void iicbus_probe_nomatch | ( | device_t | bus, |
device_t | child | ||
) |
Definition at line 172 of file iicbus.c.
References iicbus_ivar::addr, and IICBUS_IVAR.
Referenced by acpi_iicbus_probe_nomatch().
int iicbus_read_ivar | ( | device_t | bus, |
device_t | child, | ||
int | which, | ||
uintptr_t * | result | ||
) |
Definition at line 195 of file iicbus.c.
References iicbus_ivar::addr, IICBUS_IVAR, and IICBUS_IVAR_ADDR.
Referenced by acpi_iicbus_read_ivar().
int iicbus_write_ivar | ( | device_t | bus, |
device_t | child, | ||
int | which, | ||
uintptr_t | value | ||
) |
Definition at line 210 of file iicbus.c.
References iicbus_ivar::addr, IICBUS_IVAR, and IICBUS_IVAR_ADDR.
Referenced by acpi_iicbus_write_ivar().
|
extern |
|
extern |
Definition at line 85 of file ofw_iicbus.c.
|
extern |