linux/drivers/media/cec/usb/pulse8/pulse8-cec.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Pulse Eight HDMI CEC driver
 *
 * Copyright 2016 Hans Verkuil <[email protected]
 */

/*
 * Notes:
 *
 * - Devices with firmware version < 2 do not store their configuration in
 *   EEPROM.
 *
 * - In autonomous mode, only messages from a TV will be acknowledged, even
 *   polling messages. Upon receiving a message from a TV, the dongle will
 *   respond to messages from any logical address.
 *
 * - In autonomous mode, the dongle will by default reply Feature Abort
 *   [Unrecognized Opcode] when it receives Give Device Vendor ID. It will
 *   however observe vendor ID's reported by other devices and possibly
 *   alter this behavior. When TV's (and TV's only) report that their vendor ID
 *   is LG (0x00e091), the dongle will itself reply that it has the same vendor
 *   ID, and it will respond to at least one vendor specific command.
 *
 * - In autonomous mode, the dongle is known to attempt wakeup if it receives
 *   <User Control Pressed> ["Power On"], ["Power] or ["Power Toggle"], or if it
 *   receives <Set Stream Path> with its own physical address. It also does this
 *   if it receives <Vendor Specific Command> [0x03 0x00] from an LG TV.
 */

#include <linux/completion.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/workqueue.h>
#include <linux/serio.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/delay.h>

#include <media/cec.h>

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

static int debug;
static int persistent_config;
module_param(debug, int, 0644);
module_param(persistent_config, int, 0644);
MODULE_PARM_DESC();
MODULE_PARM_DESC();

enum pulse8_msgcodes {};

static const char * const pulse8_msgnames[] =;

static const char *pulse8_msgname(u8 cmd)
{}

#define MSGSTART
#define MSGEND
#define MSGESC
#define MSGOFFSET

#define DATA_SIZE

#define PING_PERIOD

#define NUM_MSGS

struct pulse8 {};

static int pulse8_send(struct serio *serio, const u8 *command, u8 cmd_len)
{}

static int pulse8_send_and_wait_once(struct pulse8 *pulse8,
				     const u8 *cmd, u8 cmd_len,
				     u8 response, u8 size)
{}

static int pulse8_send_and_wait(struct pulse8 *pulse8,
				const u8 *cmd, u8 cmd_len, u8 response, u8 size)
{}

static void pulse8_tx_work_handler(struct work_struct *work)
{}

static void pulse8_irq_work_handler(struct work_struct *work)
{}

static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data,
				    unsigned int flags)
{}

static int pulse8_cec_adap_enable(struct cec_adapter *adap, bool enable)
{}

static int pulse8_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr)
{}

static int pulse8_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
				    u32 signal_free_time, struct cec_msg *msg)
{}

static void pulse8_cec_adap_free(struct cec_adapter *adap)
{}

static const struct cec_adap_ops pulse8_cec_adap_ops =;

static void pulse8_disconnect(struct serio *serio)
{}

static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
			struct cec_log_addrs *log_addrs, u16 *pa)
{}

static int pulse8_apply_persistent_config(struct pulse8 *pulse8,
					  struct cec_log_addrs *log_addrs,
					  u16 pa)
{}

static void pulse8_ping_eeprom_work_handler(struct work_struct *work)
{}

static int pulse8_connect(struct serio *serio, struct serio_driver *drv)
{}

static const struct serio_device_id pulse8_serio_ids[] =;

MODULE_DEVICE_TABLE(serio, pulse8_serio_ids);

static struct serio_driver pulse8_drv =;

module_serio_driver();