Lines Matching refs:dev
97 #define acpi_drv_ac_present(a) (((a)->dev.type == ACPI_DRV_TYPE_AC) ? \
98 acpi_drv_dev_present(&(a)->dev) : -1)
99 #define acpi_drv_cbat_present(a) (((a)->dev.type == ACPI_DRV_TYPE_CBAT) \
100 ? acpi_drv_dev_present(&(a)->dev) : -1)
108 struct acpi_drv_dev dev;
146 struct acpi_drv_dev dev;
237 struct acpi_drv_dev dev;
250 static int acpi_drv_close(dev_t dev, int flag, int otyp, cred_t *crp);
251 static int acpi_drv_ioctl(dev_t dev, int cmd, intptr_t arg, int mode,
253 static int acpi_drv_chpoll(dev_t dev, short events, int anyyet,
414 if (bp->dev.valid) {
416 bp->dev.index);
418 MINOR_BATT(bp->dev.index), DDI_PSEUDO, 0) ==
491 acpi_drv_close(dev_t dev, int flag, int otyp, cred_t *crp)
498 acpi_drv_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *cr,
505 minor = getminor(dev);
545 if (!bp || bp->dev.valid != 1) {
555 if (bp->dev.present == 0) {
575 if (bp->dev.present == 0) {
599 if (bp->dev.valid) {
600 if (bp->dev.present) {
602 (1 << bp->dev.index);
678 if (!acp || acp->dev.valid != 1) {
696 if (!acp || acp->dev.valid != 1) {
733 res = acpi_drv_update_lid(&lid.dev);
744 res = acpi_drv_update_lid(&lid.dev);
763 acpi_drv_chpoll(dev_t dev, short events, int anyyet, short *reventsp,
969 struct acpi_drv_dev *devp = &acp->dev;
1002 struct acpi_drv_dev *devp = &bp->dev;
1028 ASSERT(bp->dev.present != 0);
1034 if (ACPI_FAILURE(AcpiEvaluateObjectTyped(bp->dev.hdl, "_BIF",
1041 ACPI_DRV_DBG(CE_NOTE, &bp->dev, "get _BIF");
1059 ASSERT(bp->dev.present != 0);
1065 if (ACPI_FAILURE(AcpiEvaluateObjectTyped(bp->dev.hdl, "_BST",
1072 ACPI_DRV_DBG(CE_NOTE, &bp->dev, "get _BST");
1219 if (bp->dev.valid) {
1238 ACPI_DRV_DBG(CE_WARN, &bp->dev,
1266 ACPI_DRV_DBG(CE_NOTE, &bp->dev,
1283 ACPI_DRV_DBG(CE_WARN, &bp->dev,
1300 ACPI_DRV_DBG(CE_NOTE, &bp->dev,
1335 struct acpi_drv_dev *devp = &bp->dev;
1485 struct acpi_drv_dev *devp = &acp->dev;
1532 if (acpi_drv_update_lid(&p->dev) == ACPI_DRV_OK) {
1533 acpi_drv_gen_sysevent(&p->dev, p->state ?
1748 if (bp->dev.valid) {
1749 (void) AcpiRemoveNotifyHandler(bp->dev.hdl,
1754 (void) AcpiRemoveNotifyHandler(acpi_drv_ac[i].dev.hdl,
1757 (void) AcpiRemoveNotifyHandler(lid.dev.hdl, ACPI_DEVICE_NOTIFY,
1954 if (bp->dev.valid) {
1959 ACPI_DRV_BIF_KSTAT_NAME, bp->dev.index);
1982 ACPI_DRV_BST_KSTAT_NAME, bp->dev.index);
2022 if (bp->dev.valid) {
2034 acpi_drv_set_int(ACPI_HANDLE dev, char *method, uint32_t aint)
2043 return (AcpiEvaluateObject(dev, method, &al, NULL));