pnp: add defines and functions for pnp devices

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>