platform: add function interface

Signed-off-by: Micky Ching <mickyching@gmail.com>