In order to simulate the power button and perform automatic suspend/wake decision, the information about the input device and backlight subsystem are needed. Below is the information collected and analyzed so far. It seems that there should be a keylayout file, which has the scan code of the power key, corresponding to the input device name.
The brightness level of the display panel is however, a little bit hard-coded to two different locations primary distinguished by Samsung and non-Samsung device. For most devices, the brightness level can be found from /sys/class/leds/lcd-backlight/brightness (such as Motorola and HTC), while Samsung devices have it in /sys/class/backlight/s5p_bl/brightness.
Due to the small variety of the backlight sub-system, it's fair to have them hard-coded. For the input device sub-system, firstly the sub-directory under /sys/class/input can be scanned for the name and capabilities/ev (as observed the right hard key device have the value of 3), then /system/usr/keylayouts/{name}.kl can be grep for the POWER keyword. The number is the scan code that should be imitating thru input_request_event.