BBB Battery shutdown

Yep, it is in the BB kernel:

https://github.com/RobertCNelson/bb-kernel/blob/am33x-v4.1/patches/beaglebone/dts/0006-tps65217-Enable-KEY_POWER-press-on-AC-loss-PWR_BUT.patch

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