linux/drivers/media/rc/ir-hix5hd2.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2014 Linaro Ltd.
 * Copyright (c) 2014 HiSilicon Limited.
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <media/rc-core.h>

#define IR_ENABLE
#define IR_CONFIG
#define CNT_LEADS
#define CNT_LEADE
#define CNT_SLEADE
#define CNT0_B
#define CNT1_B
#define IR_BUSY
#define IR_DATAH
#define IR_DATAL
#define IR_INTM
#define IR_INTS
#define IR_INTC
#define IR_START

/* interrupt mask */
#define INTMS_SYMBRCV
#define INTMS_TIMEOUT
#define INTMS_OVERFLOW
#define INT_CLR_OVERFLOW
#define INT_CLR_TIMEOUT
#define INT_CLR_RCV
#define INT_CLR_RCVTIMEOUT

#define IR_CLK_ENABLE
#define IR_CLK_RESET

/* IR_ENABLE register bits */
#define IR_ENABLE_EN
#define IR_ENABLE_EN_EXTRA

#define IR_CFG_WIDTH_MASK
#define IR_CFG_WIDTH_SHIFT
#define IR_CFG_FORMAT_MASK
#define IR_CFG_FORMAT_SHIFT
#define IR_CFG_INT_LEVEL_MASK
#define IR_CFG_INT_LEVEL_SHIFT
/* only support raw mode */
#define IR_CFG_MODE_RAW
#define IR_CFG_FREQ_MASK
#define IR_CFG_FREQ_SHIFT
#define IR_CFG_INT_THRESHOLD
/* symbol start from low to high, symbol stream end at high*/
#define IR_CFG_SYMBOL_FMT
#define IR_CFG_SYMBOL_MAXWIDTH

#define IR_HIX5HD2_NAME

/* Need to set extra bit for enabling IR */
#define HIX5HD2_FLAG_EXTRA_ENABLE

struct hix5hd2_soc_data {};

static const struct hix5hd2_soc_data hix5hd2_data =;

static const struct hix5hd2_soc_data hi3796cv300_data =;

struct hix5hd2_ir_priv {};

static int hix5hd2_ir_clk_enable(struct hix5hd2_ir_priv *dev, bool on)
{}

static inline void hix5hd2_ir_enable(struct hix5hd2_ir_priv *priv)
{}

static int hix5hd2_ir_config(struct hix5hd2_ir_priv *priv)
{}

static int hix5hd2_ir_open(struct rc_dev *rdev)
{}

static void hix5hd2_ir_close(struct rc_dev *rdev)
{}

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

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

static int hix5hd2_ir_probe(struct platform_device *pdev)
{}

static void hix5hd2_ir_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static int hix5hd2_ir_suspend(struct device *dev)
{}

static int hix5hd2_ir_resume(struct device *dev)
{}
#endif

static SIMPLE_DEV_PM_OPS(hix5hd2_ir_pm_ops, hix5hd2_ir_suspend,
			 hix5hd2_ir_resume);

static struct platform_driver hix5hd2_ir_driver =;

module_platform_driver();

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