linux/drivers/media/rc/meson-ir-tx.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * meson-ir-tx.c - Amlogic Meson IR TX driver
 *
 * Copyright (c) 2021, SberDevices. All Rights Reserved.
 *
 * Author: Viktor Prutyanov <[email protected]>
 */

#include <linux/device.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/of_irq.h>
#include <linux/clk.h>
#include <linux/slab.h>
#include <media/rc-core.h>

#define DEVICE_NAME
#define DRIVER_NAME

#define MIRTX_DEFAULT_CARRIER
#define MIRTX_DEFAULT_DUTY_CYCLE
#define MIRTX_FIFO_THD

#define IRB_MOD_1US_CLK_RATE

#define IRB_FIFO_LEN

#define IRB_ADDR0
#define IRB_ADDR1
#define IRB_ADDR2
#define IRB_ADDR3

#define IRB_MAX_DELAY
#define IRB_DELAY_MASK

/* IRCTRL_IR_BLASTER_ADDR0 */
#define IRB_MOD_CLK(x)
#define IRB_MOD_SYS_CLK
#define IRB_MOD_XTAL3_CLK
#define IRB_MOD_1US_CLK
#define IRB_MOD_10US_CLK
#define IRB_INIT_HIGH
#define IRB_ENABLE

/* IRCTRL_IR_BLASTER_ADDR2 */
#define IRB_MOD_COUNT(lo, hi)

/* IRCTRL_IR_BLASTER_ADDR2 */
#define IRB_WRITE_FIFO
#define IRB_MOD_ENABLE
#define IRB_TB_1US
#define IRB_TB_10US
#define IRB_TB_100US
#define IRB_TB_MOD_CLK

/* IRCTRL_IR_BLASTER_ADDR3 */
#define IRB_FIFO_THD_PENDING
#define IRB_FIFO_IRQ_ENABLE

struct meson_irtx {};

static void meson_irtx_set_mod(struct meson_irtx *ir)
{}

static void meson_irtx_setup(struct meson_irtx *ir, unsigned int clk_nr)
{}

static u32 meson_irtx_prepare_pulse(struct meson_irtx *ir, unsigned int time)
{}

static u32 meson_irtx_prepare_space(struct meson_irtx *ir, unsigned int time)
{}

static void meson_irtx_send_buffer(struct meson_irtx *ir)
{}

static bool meson_irtx_check_buf(struct meson_irtx *ir,
				 unsigned int *buf, unsigned int len)
{}

static void meson_irtx_fill_buf(struct meson_irtx *ir, u32 *dst_buf,
				unsigned int *src_buf, unsigned int len)
{}

static irqreturn_t meson_irtx_irqhandler(int irq, void *data)
{}

static int meson_irtx_set_carrier(struct rc_dev *rc, u32 carrier)
{}

static int meson_irtx_set_duty_cycle(struct rc_dev *rc, u32 duty_cycle)
{}

static void meson_irtx_update_buf(struct meson_irtx *ir, u32 *buf,
				  unsigned int len, unsigned int head)
{}

static int meson_irtx_transmit(struct rc_dev *rc, unsigned int *buf,
			       unsigned int len)
{}

static int meson_irtx_mod_clock_probe(struct meson_irtx *ir,
				      unsigned int *clk_nr)
{}

static int meson_irtx_probe(struct platform_device *pdev)
{}

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

static struct platform_driver meson_irtx_pd =;
module_platform_driver();

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