Yep, it is in the BB kernel:
So again, on line 164 is the Interrupt routing. It is this line:
- input_report_key(tps->pwr_but, KEY_POWER, |
- |
- ~status_reg & TPS65217_STATUS_ACPWR); |
that send a power button pressed as an input key when the AC 5V power is removed.
Regards,
John