| 1 |
// SPDX-License-Identifier: (LGPL-2.1-only OR BSD-3-Clause) |
| 2 |
/* |
| 3 |
* CEC common helper functions |
| 4 |
* |
| 5 |
* Copyright 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved. |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef _CEC_INFO_H_ |
| 9 |
#define _CEC_INFO_H_ |
| 10 |
|
| 11 |
#include <linux/cec.h> |
| 12 |
|
| 13 |
#define cec_phys_addr_exp(pa) \ |
| 14 |
((pa) >> 12), ((pa) >> 8) & 0xf, ((pa) >> 4) & 0xf, (pa) & 0xf |
| 15 |
|
| 16 |
const char *cec_opcode2s(unsigned opcode); |
| 17 |
const char *cec_cdc_opcode2s(unsigned cdc_opcode); |
| 18 |
const char *cec_htng_opcode2s(unsigned htng_opcode); |
| 19 |
const char *cec_la2s(unsigned la); |
| 20 |
const char *cec_la_type2s(unsigned type); |
| 21 |
const char *cec_prim_type2s(unsigned type); |
| 22 |
const char *cec_version2s(unsigned version); |
| 23 |
const char *cec_vendor2s(unsigned vendor); |
| 24 |
std::string cec_all_dev_types2s(unsigned types); |
| 25 |
std::string cec_rc_src_prof2s(unsigned prof, const std::string &prefix); |
| 26 |
std::string cec_dev_feat2s(unsigned feat, const std::string &prefix); |
| 27 |
std::string cec_status2s(const struct cec_msg &msg); |
| 28 |
|
| 29 |
void cec_driver_info(const struct cec_caps &caps, |
| 30 |
const struct cec_log_addrs &laddrs, __u16 phys_addr, |
| 31 |
const struct cec_connector_info &conn_info); |
| 32 |
|
| 33 |
std::string cec_device_find(const char *driver, const char *adapter); |
| 34 |
|
| 35 |
#endif |