require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&__DEV_ACPI_ACPIDEV_H__)) {
    eval 'sub __DEV_ACPI_ACPIDEV_H__ () {1;}' unless defined(&__DEV_ACPI_ACPIDEV_H__);
    require 'sys/sensors.ph';
    require 'sys/rwlock.ph';
    eval 'sub DEVNAME {
        my($s) = @_;
	    eval q((($s)-> ($sc_dev->{dv_xname})));
    }' unless defined(&DEVNAME);
    eval 'sub ACPIDEV_NOPOLL () {0;}' unless defined(&ACPIDEV_NOPOLL);
    eval 'sub ACPIDEV_POLL () {1;}' unless defined(&ACPIDEV_POLL);
    eval 'sub BIF_POWER_MW () {0x;}' unless defined(&BIF_POWER_MW);
    eval 'sub BIF_POWER_MA () {0x1;}' unless defined(&BIF_POWER_MA);
    eval 'sub BIF_UNKNOWN () {0xffffffff;}' unless defined(&BIF_UNKNOWN);
    eval 'sub BIF_TECH_PRIMARY () {0x;}' unless defined(&BIF_TECH_PRIMARY);
    eval 'sub BIF_TECH_SECONDARY () {0x1;}' unless defined(&BIF_TECH_SECONDARY);
    eval 'sub CMB_OSC_UUID () {"f18fc78b-0f15-4978-b793-53f833a1d35b";}' unless defined(&CMB_OSC_UUID);
    eval 'sub CMB_OSC_GRANULARITY () {0x1;}' unless defined(&CMB_OSC_GRANULARITY);
    eval 'sub CMB_OSC_WAKE_ON_LOW () {0x2;}' unless defined(&CMB_OSC_WAKE_ON_LOW);
    eval 'sub BST_DISCHARGE () {0x1;}' unless defined(&BST_DISCHARGE);
    eval 'sub BST_CHARGE () {0x2;}' unless defined(&BST_CHARGE);
    eval 'sub BST_CRITICAL () {0x4;}' unless defined(&BST_CRITICAL);
    eval 'sub BST_UNKNOWN () {0xffffffff;}' unless defined(&BST_UNKNOWN);
    eval 'sub BTP_CLEAR_TRIP_POINT () {0x;}' unless defined(&BTP_CLEAR_TRIP_POINT);
    eval 'sub BTM_CURRENT_RATE () {0x;}' unless defined(&BTM_CURRENT_RATE);
    eval 'sub BTM_RATE_TOO_LARGE () {0x;}' unless defined(&BTM_RATE_TOO_LARGE);
    eval 'sub BTM_CRITICAL () {0x;}' unless defined(&BTM_CRITICAL);
    eval 'sub BTM_UNKNOWN () {0xffffffff;}' unless defined(&BTM_UNKNOWN);
    eval 'sub BMD_AML_CALIBRATE_CYCLE () {0x1;}' unless defined(&BMD_AML_CALIBRATE_CYCLE);
    eval 'sub BMD_CHARGING_DISABLED () {0x2;}' unless defined(&BMD_CHARGING_DISABLED);
    eval 'sub BMD_DISCHARGE_WHILE_AC () {0x4;}' unless defined(&BMD_DISCHARGE_WHILE_AC);
    eval 'sub BMD_RECALIBRATE_BAT () {0x8;}' unless defined(&BMD_RECALIBRATE_BAT);
    eval 'sub BMD_GOTO_STANDBY_SPEED () {0x10;}' unless defined(&BMD_GOTO_STANDBY_SPEED);
    eval 'sub BMD_CB_AML_CALIBRATION () {0x1;}' unless defined(&BMD_CB_AML_CALIBRATION);
    eval 'sub BMD_CB_DISABLE_CHARGER () {0x2;}' unless defined(&BMD_CB_DISABLE_CHARGER);
    eval 'sub BMD_CB_DISCH_WHILE_AC () {0x4;}' unless defined(&BMD_CB_DISCH_WHILE_AC);
    eval 'sub BMD_CB_AFFECT_ALL_BATT () {0x8;}' unless defined(&BMD_CB_AFFECT_ALL_BATT);
    eval 'sub BMD_CB_FULL_CHRG_FIRST () {0x10;}' unless defined(&BMD_CB_FULL_CHRG_FIRST);
    eval 'sub BMD_ONLY_CALIB_IF_ST3 () {0x;}' unless defined(&BMD_ONLY_CALIB_IF_ST3);
    eval 'sub BMD_UNKNOWN () {0xffffffff;}' unless defined(&BMD_UNKNOWN);
    eval 'sub BMC_AML_CALIBRATE () {0x1;}' unless defined(&BMC_AML_CALIBRATE);
    eval 'sub BMC_DISABLE_CHARGING () {0x2;}' unless defined(&BMC_DISABLE_CHARGING);
    eval 'sub BMC_ALLOW_AC_DISCHARGE () {0x4;}' unless defined(&BMC_ALLOW_AC_DISCHARGE);
    eval 'sub PSR_OFFLINE () {0x;}' unless defined(&PSR_OFFLINE);
    eval 'sub PSR_ONLINE () {0x1;}' unless defined(&PSR_ONLINE);
    eval 'sub HPET_REG_SIZE () {1024;}' unless defined(&HPET_REG_SIZE);
    eval 'sub HPET_CAPABILITIES () {0x;}' unless defined(&HPET_CAPABILITIES);
    eval 'sub HPET_CONFIGURATION () {0x10;}' unless defined(&HPET_CONFIGURATION);
    eval 'sub HPET_INTERRUPT_STATUS () {0x20;}' unless defined(&HPET_INTERRUPT_STATUS);
    eval 'sub HPET_MAIN_COUNTER () {0xf0;}' unless defined(&HPET_MAIN_COUNTER);
    eval 'sub HPET_TIMER0_CONFIG () {0x100;}' unless defined(&HPET_TIMER0_CONFIG);
    eval 'sub HPET_TIMER0_COMPARE () {0x108;}' unless defined(&HPET_TIMER0_COMPARE);
    eval 'sub HPET_TIMER0_INTERRUPT () {0x110;}' unless defined(&HPET_TIMER0_INTERRUPT);
    eval 'sub HPET_TIMER1_CONFIG () {0x200;}' unless defined(&HPET_TIMER1_CONFIG);
    eval 'sub HPET_TIMER1_COMPARE () {0x208;}' unless defined(&HPET_TIMER1_COMPARE);
    eval 'sub HPET_TIMER1_INTERRUPT () {0x310;}' unless defined(&HPET_TIMER1_INTERRUPT);
    eval 'sub HPET_TIMER2_CONFIG () {0x400;}' unless defined(&HPET_TIMER2_CONFIG);
    eval 'sub HPET_TIMER2_COMPARE () {0x408;}' unless defined(&HPET_TIMER2_COMPARE);
    eval 'sub HPET_TIMER2_INTERRUPT () {0x510;}' unless defined(&HPET_TIMER2_INTERRUPT);
    eval 'sub STA_PRESENT () {(1 << 0);}' unless defined(&STA_PRESENT);
    eval 'sub STA_ENABLED () {(1 << 1);}' unless defined(&STA_ENABLED);
    eval 'sub STA_SHOW_UI () {(1 << 2);}' unless defined(&STA_SHOW_UI);
    eval 'sub STA_DEV_OK () {(1 << 3);}' unless defined(&STA_DEV_OK);
    eval 'sub STA_BATTERY () {(1 << 4);}' unless defined(&STA_BATTERY);
    eval 'sub ACPIDOCK_STATUS_UNKNOWN () {-1;}' unless defined(&ACPIDOCK_STATUS_UNKNOWN);
    eval 'sub ACPIDOCK_STATUS_UNDOCKED () {0;}' unless defined(&ACPIDOCK_STATUS_UNDOCKED);
    eval 'sub ACPIDOCK_STATUS_DOCKED () {1;}' unless defined(&ACPIDOCK_STATUS_DOCKED);
    eval 'sub ACPIDOCK_EVENT_INSERT () {0;}' unless defined(&ACPIDOCK_EVENT_INSERT);
    eval 'sub ACPIDOCK_EVENT_EJECT () {3;}' unless defined(&ACPIDOCK_EVENT_EJECT);
}
1;
