On 04/23/2015 03:03 PM, Kamil Debski wrote:
> From: Hans Verkuil <[email protected]>
> 
> The added HDMI CEC framework provides a generic kernel interface for
> HDMI CEC devices.
> 
> Signed-off-by: Hans Verkuil <[email protected]>
> [[email protected]: Merged CEC Updates commit by Hans Verkuil]
> [[email protected]: Merged Update author commit by Hans Verkuil]
> [[email protected]: change kthread handling when setting logical
> address]
> [[email protected]: code cleanup and fixes]
> [[email protected]: add missing CEC commands to match spec]
> [[email protected]: add RC framework support]
> [[email protected]: move and edit documentation]
> [[email protected]: add vendor id reporting]
> [[email protected]: add possibility to clear assigned logical
> addresses]
> [[email protected]: documentation fixes, clenaup and expansion]
> [[email protected]: reorder of API structs and add reserved fields]
> [[email protected]: fix handling of events and fix 32/64bit timespec
> problem]
> [[email protected]: add cec.h to include/uapi/linux/Kbuild]
> Signed-off-by: Kamil Debski <[email protected]>
> ---
>  Documentation/cec.txt     |  396 ++++++++++++++++
>  drivers/media/Kconfig     |    6 +
>  drivers/media/Makefile    |    2 +
>  drivers/media/cec.c       | 1161 
> +++++++++++++++++++++++++++++++++++++++++++++
>  include/media/cec.h       |  140 ++++++
>  include/uapi/linux/Kbuild |    1 +
>  include/uapi/linux/cec.h  |  303 ++++++++++++
>  7 files changed, 2009 insertions(+)
>  create mode 100644 Documentation/cec.txt
>  create mode 100644 drivers/media/cec.c
>  create mode 100644 include/media/cec.h
>  create mode 100644 include/uapi/linux/cec.h
> 

> +     case CEC_S_ADAP_LOG_ADDRS: {
> +             struct cec_log_addrs log_addrs;
> +
> +             if (!(adap->capabilities & CEC_CAP_LOG_ADDRS))
> +                     return -ENOTTY;
> +             if (copy_from_user(&log_addrs, parg, sizeof(log_addrs)))
> +                     return -EFAULT;
> +             err = cec_claim_log_addrs(adap, &log_addrs, true);

Currently CEC_S_ADAP_LOG_ADDRS is always blocking, but since we have 
CEC_EVENT_READY
I think it makes sense to just return in non-blocking mode and have 
cec_claim_log_addrs
generate CEC_EVENT_READY when done. Userspace can then call G_ADAP_LOG_ADDRS to 
discover
the result.

What do you think?

Regards,

        Hans

> +             if (err)
> +                     return err;
> +
> +             if (copy_to_user(parg, &log_addrs, sizeof(log_addrs)))
> +                     return -EFAULT;
> +             break;
> +     }

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to