brintos

brintos / linux-shallow public Read only

0
0
Text · 1.4 KiB · 7422f7c Raw
52 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2 3/*4 * Copyright 2021-2024 Cisco Systems, Inc. and/or its affiliates. All rights reserved.5 */6 7#ifndef _CEC_SPLITTER_H_8#define _CEC_SPLITTER_H_9 10struct cec_splitter;11 12#define STATE_CHANGE_MAX_REPEATS 213 14struct cec_splitter_port {15	struct cec_splitter *splitter;16	struct cec_adapter *adap;17	unsigned int port;18	bool is_active_source;19	bool found_sink;20	ktime_t lost_sink_ts;21	u32 out_request_current_latency_seq;22	ktime_t out_request_current_latency_ts;23	u8 video_latency;24	u32 out_give_device_power_status_seq;25	ktime_t out_give_device_power_status_ts;26	u8 power_status;27};28 29struct cec_splitter {30	struct device *dev;31	unsigned int num_out_ports;32	struct cec_splitter_port **ports;33 34	/* High-level splitter state */35	u8 request_current_latency_dest;36	u8 give_device_power_status_dest;37	bool is_standby;38};39 40void cec_splitter_unconfigured_output(struct cec_splitter_port *port);41void cec_splitter_configured_output(struct cec_splitter_port *port);42int cec_splitter_received_input(struct cec_splitter_port *port, struct cec_msg *msg);43int cec_splitter_received_output(struct cec_splitter_port *port, struct cec_msg *msg,44				 struct cec_adapter *input_adap);45void cec_splitter_nb_transmit_canceled_output(struct cec_splitter_port *port,46					      const struct cec_msg *msg,47					      struct cec_adapter *input_adap);48bool cec_splitter_poll(struct cec_splitter *splitter,49		       struct cec_adapter *input_adap, bool debug);50 51#endif52