Input: Support set power/wakeup node of device

power/wakeup attribute allows the userspace to check
if the device is enabled to wake up the kernel from
sleep states. Devices support "wakeup" events can send
hardware signal to resume systems.

This change follows kernel doc:
"In that cases the user space can change the setting
represented by the contents of this file by writing
either "enabled", or "disabled" to it."

DD: go/configure-al-kernel-wake
Bug: 372812925
Test: atest inputflinger_tests
Test: Plug in USB mouse with the set of changes:
      power/wakeup of mouse becomes enabled and it can wake
      up from "echo mem > /sys/power/state".
Flag: com.android.input.flags.set_input_device_kernel_wake

Change-Id: I188c34cc645e9582d35a00a267653a0ca9c1da6e
diff --git a/services/inputflinger/include/InputReaderBase.h b/services/inputflinger/include/InputReaderBase.h
index 756a29b..6093c91 100644
--- a/services/inputflinger/include/InputReaderBase.h
+++ b/services/inputflinger/include/InputReaderBase.h
@@ -426,6 +426,16 @@
 
     /* Notifies that mouse cursor faded due to typing. */
     virtual void notifyMouseCursorFadedOnTyping() = 0;
+
+    /* Set whether the given input device can wake up the kernel from sleep
+     * when it generates input events. By default, usually only internal (built-in)
+     * input devices can wake the kernel from sleep. For an external input device
+     * that supports remote wakeup to be able to wake the kernel, this must be called
+     * after each time the device is connected/added.
+     *
+     * Returns true if setting power wakeup was successful.
+     */
+    virtual bool setKernelWakeEnabled(int32_t deviceId, bool enabled) = 0;
 };
 
 // --- TouchAffineTransformation ---