device: Add function to retrieve hardware version.