xref: /linux/Documentation/userspace-api/media/cec/cec-ioc-adap-g-conn-info.rst (revision cbac924200b838cfb8d8b1415113d788089dc50b)
1.. SPDX-License-Identifier: GPL-2.0
2..
3.. Copyright 2019 Google LLC
4..
5.. c:namespace:: CEC
6
7.. _CEC_ADAP_G_CONNECTOR_INFO:
8
9*******************************
10ioctl CEC_ADAP_G_CONNECTOR_INFO
11*******************************
12
13Name
14====
15
16CEC_ADAP_G_CONNECTOR_INFO - Query HDMI connector information
17
18Synopsis
19========
20
21.. c:macro:: CEC_ADAP_G_CONNECTOR_INFO
22
23``int ioctl(int fd, CEC_ADAP_G_CONNECTOR_INFO, struct cec_connector_info *argp)``
24
25Arguments
26=========
27
28``fd``
29    File descriptor returned by :c:func:`open()`.
30
31``argp``
32
33Description
34===========
35
36Using this ioctl an application can learn which HDMI connector this CEC
37device corresponds to. While calling this ioctl the application should
38provide a pointer to a cec_connector_info struct which will be populated
39by the kernel with the info provided by the adapter's driver. This ioctl
40is only available if the ``CEC_CAP_CONNECTOR_INFO`` capability is set.
41
42.. tabularcolumns:: |p{1.0cm}|p{4.4cm}|p{2.5cm}|p{9.2cm}|
43
44.. c:type:: cec_connector_info
45
46.. flat-table:: struct cec_connector_info
47    :header-rows:  0
48    :stub-columns: 0
49    :widths:       1 1 8
50
51    * - __u32
52      - ``type``
53      - The type of connector this adapter is associated with.
54    * - union {
55      - ``(anonymous)``
56    * - ``struct cec_drm_connector_info``
57      - drm
58      - :ref:`cec-drm-connector-info`
59    * - }
60      -
61
62.. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.4cm}|
63
64.. _connector-type:
65
66.. flat-table:: Connector types
67    :header-rows:  0
68    :stub-columns: 0
69    :widths:       3 1 8
70
71    * .. _`CEC-CONNECTOR-TYPE-NO-CONNECTOR`:
72
73      - ``CEC_CONNECTOR_TYPE_NO_CONNECTOR``
74      - 0
75      - No connector is associated with the adapter/the information is not
76        provided by the driver.
77    * .. _`CEC-CONNECTOR-TYPE-DRM`:
78
79      - ``CEC_CONNECTOR_TYPE_DRM``
80      - 1
81      - Indicates that a DRM connector is associated with this adapter.
82        Information about the connector can be found in
83	:ref:`cec-drm-connector-info`.
84
85.. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.4cm}|
86
87.. c:type:: cec_drm_connector_info
88
89.. _cec-drm-connector-info:
90
91.. flat-table:: struct cec_drm_connector_info
92    :header-rows:  0
93    :stub-columns: 0
94    :widths:       3 1 8
95
96    * .. _`CEC-DRM-CONNECTOR-TYPE-CARD-NO`:
97
98      - __u32
99      - ``card_no``
100      - DRM card number: the number from a card's path, e.g. 0 in case of
101        /dev/card0.
102    * .. _`CEC-DRM-CONNECTOR-TYPE-CONNECTOR_ID`:
103
104      - __u32
105      - ``connector_id``
106      - DRM connector ID.
107