linux/drivers/media/cec/platform/stm32/stm32-cec.c

// SPDX-License-Identifier: GPL-2.0
/*
 * STM32 CEC driver
 * Copyright (C) STMicroelectronics SA 2017
 *
 */

#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

#include <media/cec.h>

#define CEC_NAME

/* CEC registers  */
#define CEC_CR
#define CEC_CFGR
#define CEC_TXDR
#define CEC_RXDR
#define CEC_ISR
#define CEC_IER

#define TXEOM
#define TXSOM
#define CECEN

#define LSTN
#define OAR
#define SFTOP
#define BRDNOGEN
#define LBPEGEN
#define BREGEN
#define BRESTP
#define RXTOL
#define SFT
#define FULL_CFG

#define TXACKE
#define TXERR
#define TXUDR
#define TXEND
#define TXBR
#define ARBLST
#define RXACKE
#define RXOVR
#define RXEND
#define RXBR

#define ALL_TX_IT
#define ALL_RX_IT

/*
 * 400 ms is the time it takes for one 16 byte message to be
 * transferred and 5 is the maximum number of retries. Add
 * another 100 ms as a margin.
 */
#define CEC_XFER_TIMEOUT_MS

struct stm32_cec {};

static void cec_hw_init(struct stm32_cec *cec)
{}

static void stm32_tx_done(struct stm32_cec *cec, u32 status)
{}

static void stm32_rx_done(struct stm32_cec *cec, u32 status)
{}

static irqreturn_t stm32_cec_irq_thread(int irq, void *arg)
{}

static irqreturn_t stm32_cec_irq_handler(int irq, void *arg)
{}

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

static int stm32_cec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr)
{}

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

static const struct cec_adap_ops stm32_cec_adap_ops =;

static const struct regmap_config stm32_cec_regmap_cfg =;

static int stm32_cec_probe(struct platform_device *pdev)
{}

static void stm32_cec_remove(struct platform_device *pdev)
{}

static const struct of_device_id stm32_cec_of_match[] =;
MODULE_DEVICE_TABLE(of, stm32_cec_of_match);

static struct platform_driver stm32_cec_driver =;

module_platform_driver();

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