media: cec: rework the cec event handling
authorHans Verkuil <hans.verkuil@cisco.com>
Tue, 11 Jul 2017 06:30:39 +0000 (03:30 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 18 Jul 2017 15:49:36 +0000 (12:49 -0300)
commit6b2bbb08747a56dcf4ee33606a06025eca571260
tree00fe39f2fca026746238ddd8e1f625ce81a0649a
parent6303d97873d340e89acdef12effb66f88d79836f
media: cec: rework the cec event handling

Event handling was always fairly simplistic since there were only
two events. With the addition of pin events this needed to be redesigned.

The state_change and lost_msgs events are now core events with the
guarantee that the last state is always available. The new pin events
are a queue of events (up to 64 for each event) and the oldest event
will be dropped if the application cannot keep up. Lost events are
marked with a new event flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/cec/cec-adap.c
drivers/media/cec/cec-api.c
include/media/cec.h
include/uapi/linux/cec.h