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