Default Help understand working of power button and volume rockers

Hello guys,

I need to understand detail working of volume rockers and power button, Which are kernel drivers related to it,what happens in bootloader and kernel when I press power button.

Can anyone give me some idea?