Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/gpio/gpiobusvar.h
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
struct intr_map_data_gpio { | struct intr_map_data_gpio { | ||||
struct intr_map_data hdr; | struct intr_map_data hdr; | ||||
u_int gpio_pin_num; | u_int gpio_pin_num; | ||||
u_int gpio_pin_flags; | u_int gpio_pin_flags; | ||||
u_int gpio_intr_mode; | u_int gpio_intr_mode; | ||||
}; | }; | ||||
#endif | #endif | ||||
struct gpiopic; | |||||
struct gpiobus_softc | struct gpiobus_softc | ||||
{ | { | ||||
struct mtx sc_mtx; /* bus mutex */ | struct mtx sc_mtx; /* bus mutex */ | ||||
struct rman sc_intr_rman; /* isr resources */ | struct rman sc_intr_rman; /* isr resources */ | ||||
struct gpiopic *sc_pic; /* interrupt controller logic */ | |||||
device_t sc_busdev; /* bus device */ | device_t sc_busdev; /* bus device */ | ||||
device_t sc_owner; /* bus owner */ | device_t sc_owner; /* bus owner */ | ||||
device_t sc_dev; /* driver device */ | device_t sc_dev; /* driver device */ | ||||
int sc_npins; /* total pins on bus */ | int sc_npins; /* total pins on bus */ | ||||
struct gpiobus_pin_data *sc_pins; /* pin data */ | struct gpiobus_pin_data *sc_pins; /* pin data */ | ||||
}; | }; | ||||
struct gpiobus_pin | struct gpiobus_pin | ||||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Functions shared between gpiobus and other bus classes that derive from it; | * Functions shared between gpiobus and other bus classes that derive from it; | ||||
* these should not be called directly by other drivers. | * these should not be called directly by other drivers. | ||||
*/ | */ | ||||
int gpio_check_flags(uint32_t, uint32_t); | int gpio_check_flags(uint32_t, uint32_t); | ||||
device_t gpiobus_attach_bus(device_t); | device_t gpiobus_attach_bus(device_t); | ||||
int gpiobus_detach_bus(device_t); | int gpiobus_detach_bus(device_t); | ||||
void gpiobus_handle_intr(device_t, uint32_t); | |||||
int gpiobus_init_softc(device_t); | int gpiobus_init_softc(device_t); | ||||
int gpiobus_alloc_ivars(struct gpiobus_ivar *); | int gpiobus_alloc_ivars(struct gpiobus_ivar *); | ||||
void gpiobus_free_ivars(struct gpiobus_ivar *); | void gpiobus_free_ivars(struct gpiobus_ivar *); | ||||
int gpiobus_acquire_pin(device_t, uint32_t); | int gpiobus_acquire_pin(device_t, uint32_t); | ||||
int gpiobus_release_pin(device_t, uint32_t); | int gpiobus_release_pin(device_t, uint32_t); | ||||
extern driver_t gpiobus_driver; | extern driver_t gpiobus_driver; | ||||
#endif /* __GPIOBUS_H__ */ | #endif /* __GPIOBUS_H__ */ |