acpi: add a generic function to execute a method with an input and an integer output

Signed-off-by: Alex Hung <alex.hung@canonical.com>