summaryrefslogtreecommitdiff
path: root/drivers/staging/media/cec/cec-api.c
AgeCommit message (Collapse)Author
2016-09-09[media] cec: fix ioctl return code when not registeredHans Verkuil
Don't return the confusing -EIO error code when the device is not registered, instead return -ENODEV which is the proper thing to do in this situation. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22[media] cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flagHans Verkuil
Currently if none of the requested logical addresses can be claimed, the framework will fall back to the Unregistered logical address. Add a flag to enable this explicitly. By default it will just go back to the unconfigured state. Usually Unregistered is not something you want since the functionality is very limited. Unless the application has support for this, it will fail to work correctly. So require that the application explicitly requests this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22[media] cec: rename cec_devnode fhs_lock to just lockHans Verkuil
This lock will be used to protect more than just the fhs list. So rename it to just 'lock'. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19[media] cec: poll should check if there is room in the tx queueHans Verkuil
For POLLOUT poll only checked if the adapter was configured, not if there was room in the transmit queue. Add that check. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19[media] cec: don't set fh to NULL in CEC_TRANSMITHans Verkuil
The filehandle was set to NULL when in non-blocking mode or when no reply is needed. This is wrong: the filehandle is needed in non-blocking mode to ensure that the result of the transmit can be obtained through CEC_RECEIVE. And the 'reply' check was also incorrect since it should have checked the timeout field (the reply can be 0). In any case, when in blocking mode there is no need to set the fh to NULL either. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19[media] cec: CEC_RECEIVE overwrote the timeout fieldHans Verkuil
When CEC_RECEIVE returns a message the original timeout field was overwritten. Restore the timeout field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] cec: CEC_RECEIVE is allowed in monitor modeHans Verkuil
When the device is in monitor mode, then you should always be able to call CEC_RECEIVE, even it the device is unconfigured. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-28[media] cec: add HDMI CEC framework (api)Hans Verkuil
The added HDMI CEC framework provides a generic kernel interface for HDMI CEC devices. Note that the CEC framework is added to staging/media and that the cec.h and cec-funcs.h headers are not exported yet. While the kABI is mature, I would prefer to allow the uABI some more time before it is mainlined in case it needs more tweaks. This adds the cec-api.c source that deals with the public CEC API and the Kconfig/Makefile plumbing. The MAINTAINERS file is also updated. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [k.debski@samsung.com: code cleanup and fixes] Signed-off-by: Kamil Debski <kamil@wypas.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>