refactor common device files

Change-Id: I593e8524aaf9b05733806ef50429d0ebd67074dd