Lines Matching refs:dev

68 static int cec_is_connected(const struct hdmi_cec_device* dev, int port_id);
162 static int cec_add_logical_address(const struct hdmi_cec_device* dev, in cec_add_logical_address() argument
169 cec_context_t* ctx = (cec_context_t*)(dev); in cec_add_logical_address()
179 static void cec_clear_logical_address(const struct hdmi_cec_device* dev) in cec_clear_logical_address() argument
181 cec_context_t* ctx = (cec_context_t*)(dev); in cec_clear_logical_address()
189 static int cec_get_physical_address(const struct hdmi_cec_device* dev, in cec_get_physical_address() argument
192 cec_context_t* ctx = (cec_context_t*)(dev); in cec_get_physical_address()
206 static int cec_send_message(const struct hdmi_cec_device* dev, in cec_send_message() argument
210 if(cec_is_connected(dev, 0) <= 0) in cec_send_message()
213 cec_context_t* ctx = (cec_context_t*)(dev); in cec_send_message()
293 event.dev = (hdmi_cec_device *) ctx; in cec_receive_message()
312 event.dev = (hdmi_cec_device *) ctx; in cec_hdmi_hotplug()
317 static void cec_register_event_callback(const struct hdmi_cec_device* dev, in cec_register_event_callback() argument
321 cec_context_t* ctx = (cec_context_t*)(dev); in cec_register_event_callback()
326 static void cec_get_version(const struct hdmi_cec_device* dev, int* version) in cec_get_version() argument
328 cec_context_t* ctx = (cec_context_t*)(dev); in cec_get_version()
333 static void cec_get_vendor_id(const struct hdmi_cec_device* dev, in cec_get_vendor_id() argument
336 cec_context_t* ctx = (cec_context_t*)(dev); in cec_get_vendor_id()
341 static void cec_get_port_info(const struct hdmi_cec_device* dev, in cec_get_port_info() argument
345 cec_context_t* ctx = (cec_context_t*)(dev); in cec_get_port_info()
350 static void cec_set_option(const struct hdmi_cec_device* dev, int flag, in cec_set_option() argument
353 cec_context_t* ctx = (cec_context_t*)(dev); in cec_set_option()
371 static void cec_set_audio_return_channel(const struct hdmi_cec_device* dev, in cec_set_audio_return_channel() argument
374 cec_context_t* ctx = (cec_context_t*)(dev); in cec_set_audio_return_channel()
379 static int cec_is_connected(const struct hdmi_cec_device* dev, int port_id) in cec_is_connected() argument
383 cec_context_t* ctx = (cec_context_t*)(dev); in cec_is_connected()
399 static int cec_device_close(struct hw_device_t *dev) in cec_device_close() argument
402 if (!dev) { in cec_device_close()
406 cec_context_t* ctx = (cec_context_t*)(dev); in cec_device_close()
408 free(dev); in cec_device_close()
469 struct cec_context_t *dev; in cec_device_open() local
470 dev = (cec_context_t *) calloc (1, sizeof(*dev)); in cec_device_open()
471 if (dev) { in cec_device_open()
472 cec_init_context(dev); in cec_device_open()
475 dev->device.common.tag = HARDWARE_DEVICE_TAG; in cec_device_open()
476 dev->device.common.version = HDMI_CEC_DEVICE_API_VERSION_1_0; in cec_device_open()
477 dev->device.common.module = const_cast<hw_module_t* >(module); in cec_device_open()
478 dev->device.common.close = cec_device_close; in cec_device_open()
479 dev->device.add_logical_address = cec_add_logical_address; in cec_device_open()
480 dev->device.clear_logical_address = cec_clear_logical_address; in cec_device_open()
481 dev->device.get_physical_address = cec_get_physical_address; in cec_device_open()
482 dev->device.send_message = cec_send_message; in cec_device_open()
483 dev->device.register_event_callback = cec_register_event_callback; in cec_device_open()
484 dev->device.get_version = cec_get_version; in cec_device_open()
485 dev->device.get_vendor_id = cec_get_vendor_id; in cec_device_open()
486 dev->device.get_port_info = cec_get_port_info; in cec_device_open()
487 dev->device.set_option = cec_set_option; in cec_device_open()
488 dev->device.set_audio_return_channel = cec_set_audio_return_channel; in cec_device_open()
489 dev->device.is_connected = cec_is_connected; in cec_device_open()
491 *device = &dev->device.common; in cec_device_open()