Revert "Revert "add device plugin""

This reverts commit 74a363e73a8f33c527f7868674b1209b02ceaa9a.