#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <media/rc-core.h>
#define MTK_IR_DEV …
#define MTK_CONFIG_HIGH_REG …
#define MTK_PWM_EN …
#define MTK_OK_COUNT_MASK …
#define MTK_OK_COUNT(x) …
#define MTK_IR_EN …
#define MTK_IRCLR …
#define MTK_WIDTH_MASK …
#define MTK_IRTHD …
#define MTK_DG_CNT_MASK …
#define MTK_DG_CNT(x) …
#define MTK_IRINT_EN …
#define MTK_IRINT_CLR …
#define MTK_MAX_SAMPLES …
#define MTK_IR_END(v, p) …
#define MTK_CHKDATA_SZ …
#define MTK_IR_SAMPLE …
enum mtk_fields { … };
enum mtk_regs { … };
static const u32 mt7623_regs[] = …;
static const u32 mt7622_regs[] = …;
struct mtk_field_type { … };
struct mtk_ir_data { … };
static const struct mtk_field_type mt7623_fields[] = …;
static const struct mtk_field_type mt7622_fields[] = …;
struct mtk_ir { … };
static inline u32 mtk_chkdata_reg(struct mtk_ir *ir, u32 i)
{ … }
static inline u32 mtk_chk_period(struct mtk_ir *ir)
{ … }
static void mtk_w32_mask(struct mtk_ir *ir, u32 val, u32 mask, unsigned int reg)
{ … }
static void mtk_w32(struct mtk_ir *ir, u32 val, unsigned int reg)
{ … }
static u32 mtk_r32(struct mtk_ir *ir, unsigned int reg)
{ … }
static inline void mtk_irq_disable(struct mtk_ir *ir, u32 mask)
{ … }
static inline void mtk_irq_enable(struct mtk_ir *ir, u32 mask)
{ … }
static irqreturn_t mtk_ir_irq(int irqno, void *dev_id)
{ … }
static const struct mtk_ir_data mt7623_data = …;
static const struct mtk_ir_data mt7622_data = …;
static const struct of_device_id mtk_ir_match[] = …;
MODULE_DEVICE_TABLE(of, mtk_ir_match);
static int mtk_ir_probe(struct platform_device *pdev)
{ … }
static void mtk_ir_remove(struct platform_device *pdev)
{ … }
static struct platform_driver mtk_ir_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;