Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/allwinner/axp81x.c
Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Lines | if (bootverbose) | ||||
device_printf(dev, "Shutdown AXP81x\n"); | device_printf(dev, "Shutdown AXP81x\n"); | ||||
axp81x_write(dev, AXP_POWERBAT, AXP_POWERBAT_SHUTDOWN); | axp81x_write(dev, AXP_POWERBAT, AXP_POWERBAT_SHUTDOWN); | ||||
} | } | ||||
static void | static void | ||||
axp81x_intr(void *arg) | axp81x_intr(void *arg) | ||||
{ | { | ||||
struct axp81x_softc *sc; | |||||
device_t dev; | device_t dev; | ||||
uint8_t val; | uint8_t val; | ||||
int error; | int error; | ||||
dev = arg; | dev = arg; | ||||
sc = device_get_softc(dev); | |||||
error = axp81x_read(dev, AXP_IRQSTAT5, &val, 1); | error = axp81x_read(dev, AXP_IRQSTAT5, &val, 1); | ||||
if (error != 0) | if (error != 0) | ||||
return; | return; | ||||
if (val != 0) { | if (val != 0) { | ||||
if ((val & AXP_IRQSTAT5_POKSIRQ) != 0) { | if ((val & AXP_IRQSTAT5_POKSIRQ) != 0) { | ||||
if (bootverbose) | if (bootverbose) | ||||
▲ Show 20 Lines • Show All 416 Lines • Show Last 20 Lines |