Lines Matching refs:dev

72 static int cec_is_connected(const struct hdmi_cec_device* dev, int port_id);
166 static int cec_add_logical_address(const struct hdmi_cec_device* dev, in cec_add_logical_address() argument
173 cec_context_t* ctx = (cec_context_t*)(dev); in cec_add_logical_address()
183 static void cec_clear_logical_address(const struct hdmi_cec_device* dev) in cec_clear_logical_address() argument
185 cec_context_t* ctx = (cec_context_t*)(dev); in cec_clear_logical_address()
193 static int cec_get_physical_address(const struct hdmi_cec_device* dev, in cec_get_physical_address() argument
196 cec_context_t* ctx = (cec_context_t*)(dev); in cec_get_physical_address()
210 static int cec_send_message(const struct hdmi_cec_device* dev, in cec_send_message() argument
214 if(cec_is_connected(dev, 0) <= 0) in cec_send_message()
217 cec_context_t* ctx = (cec_context_t*)(dev); in cec_send_message()
297 event.dev = (hdmi_cec_device *) ctx; in cec_receive_message()
318 event.dev = (hdmi_cec_device *) ctx; in cec_hdmi_hotplug()
323 static void cec_register_event_callback(const struct hdmi_cec_device* dev, in cec_register_event_callback() argument
327 cec_context_t* ctx = (cec_context_t*)(dev); in cec_register_event_callback()
332 static void cec_get_version(const struct hdmi_cec_device* dev, int* version) in cec_get_version() argument
334 cec_context_t* ctx = (cec_context_t*)(dev); in cec_get_version()
339 static void cec_get_vendor_id(const struct hdmi_cec_device* dev, in cec_get_vendor_id() argument
342 cec_context_t* ctx = (cec_context_t*)(dev); in cec_get_vendor_id()
347 static void cec_get_port_info(const struct hdmi_cec_device* dev, in cec_get_port_info() argument
351 cec_context_t* ctx = (cec_context_t*)(dev); in cec_get_port_info()
356 static void cec_set_option(const struct hdmi_cec_device* dev, int flag, in cec_set_option() argument
359 cec_context_t* ctx = (cec_context_t*)(dev); in cec_set_option()
377 static void cec_set_audio_return_channel(const struct hdmi_cec_device* dev, in cec_set_audio_return_channel() argument
380 cec_context_t* ctx = (cec_context_t*)(dev); in cec_set_audio_return_channel()
385 static int cec_is_connected(const struct hdmi_cec_device* dev, int port_id) in cec_is_connected() argument
389 cec_context_t* ctx = (cec_context_t*)(dev); in cec_is_connected()
405 static int cec_device_close(struct hw_device_t *dev) in cec_device_close() argument
408 if (!dev) { in cec_device_close()
412 cec_context_t* ctx = (cec_context_t*)(dev); in cec_device_close()
414 free(dev); in cec_device_close()
475 struct cec_context_t *dev; in cec_device_open() local
476 dev = (cec_context_t *) calloc (1, sizeof(*dev)); in cec_device_open()
477 if (dev) { in cec_device_open()
478 cec_init_context(dev); in cec_device_open()
481 dev->device.common.tag = HARDWARE_DEVICE_TAG; in cec_device_open()
482 dev->device.common.version = HDMI_CEC_DEVICE_API_VERSION_1_0; in cec_device_open()
483 dev->device.common.module = const_cast<hw_module_t* >(module); in cec_device_open()
484 dev->device.common.close = cec_device_close; in cec_device_open()
485 dev->device.add_logical_address = cec_add_logical_address; in cec_device_open()
486 dev->device.clear_logical_address = cec_clear_logical_address; in cec_device_open()
487 dev->device.get_physical_address = cec_get_physical_address; in cec_device_open()
488 dev->device.send_message = cec_send_message; in cec_device_open()
489 dev->device.register_event_callback = cec_register_event_callback; in cec_device_open()
490 dev->device.get_version = cec_get_version; in cec_device_open()
491 dev->device.get_vendor_id = cec_get_vendor_id; in cec_device_open()
492 dev->device.get_port_info = cec_get_port_info; in cec_device_open()
493 dev->device.set_option = cec_set_option; in cec_device_open()
494 dev->device.set_audio_return_channel = cec_set_audio_return_channel; in cec_device_open()
495 dev->device.is_connected = cec_is_connected; in cec_device_open()
497 *device = &dev->device.common; in cec_device_open()