device: add get_device_subclass and get_device_protocol methods