We are using ADV7611 in our board, I want to receive interrupt to driver when video source is connected to ADV7611.
can you please help for ADV7611 configuration for this.
The driver register a "Power Present" control that can be queried to get the current state of whether a cable is connected or not.
If you want to the driver to send a notification when the status of that control changes you need to implement a IRQ handler in your board driver that is triggered when the INT signal of the ADV7611 is asserted. In this interrupt handler you need to call the interrupt_service_routine callback of the ADV7611 subdevice. E.g.
v4l2_subdev_call(dev->sd, core, interrupt_service_routine,
Thanks for the reply Lars.
Bit0 of the 0x6F register under IO specifies whether cable is connected or not. what is mean by driver register "power present" control, does Linux Kernel(V4L2) will provide any function pointer for this, so that we can register a callback and check bit0 of 0x6F inside the callback.
If we register ISR from the driver then ISR will be called when control changes, will V4L2 provides standard way to send this control change event to user space or we have to use Kernel mechanisms like netlink sockets etc for sending the event to user space.
Yes, your userspace applications can subscribe to changes to the control and gets notified when it happens.
Check out the V4L2 user controls documentation.
Please confirm my understanding, user space application can susbcribe for an event(say HDMI source connected), so that V4L2 notifies to all the subscribed application when HDMI source is connected.
But someone has to initiate this notification, so that V4L2 notifies to all the subscribed application. I think it is the driver which is initiating the notification.
Can you please tell me the interface between driver and V4L2 to initiate the notification. The existing adv7604 driver(http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/media/i2c/adv7604.c) is having any such notification implementation.
In the adv7604_s_detect_tx_5v_ctrl() function the "Power Present" control is updated using v4l2_ctrl_s_ctrl(). This will generate a notification to all userspace applications that have subscribed to changes on the "Power Present" control.
Thanks very much,now I understood the flow.
I will check how user space application has to subscribe for the event.
Retrieving data ...