aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/cec (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-11-29[media] cec: pass parent device in register(), not allocate()Hans Verkuil2-9/+11
The cec_allocate_adapter function doesn't need the parent device, only the cec_register_adapter function needs it. Drop the cec_devnode parent field, since devnode.dev.parent can be used instead. This change makes the framework consistent with other frameworks where the parent device is not used until the device is registered. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-22[media] cec: ignore messages that we initiatedHans Verkuil1-0/+15
Some CEC adapters will receive messages that they initiated. Add a check that will ignore such messages. Most hardware behaves correctly in this respect, but I have seen adapters that don't, so just filter this out in the framework. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cec: zero counters in cec_received_msg()Hans Verkuil1-0/+4
Make sure the TX counters are zeroed in the cec_msg struct. Non-zero TX counters make no sense when a message is received, and applications should not see non-zero values here. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cec: an inner loop clobbered the outer loop variableHans Verkuil1-4/+5
An inner for-loop reused the outer loop variable. This was only noticeable with CEC adapters supporting more than one logical address. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cec: sanitize msg.flagsHans Verkuil2-1/+5
The CEC_MSG_FL_REPLY_TO_FOLLOWERS message flag only makes sense for transmitted messages where you want to wait for the reply. Clear the flag in all other cases. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cec: move the CEC framework out of staging and to mediaHans Verkuil5-0/+2916
The last open issues have been addressed, so it is time to move this out of staging and into the mainline and to move the public cec headers to include/uapi/linux. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>