linux/drivers/hte/hte-tegra194.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2021-2022 NVIDIA Corporation
 *
 * Author: Dipen Patel <[email protected]>
 */

#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/interrupt.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/hte.h>
#include <linux/uaccess.h>
#include <linux/gpio/driver.h>
#include <linux/gpio/consumer.h>

#define HTE_SUSPEND

/* HTE source clock TSC is 31.25MHz */
#define HTE_TS_CLK_RATE_HZ
#define HTE_CLK_RATE_NS
#define HTE_TS_NS_SHIFT

#define NV_AON_SLICE_INVALID
#define NV_LINES_IN_SLICE

/* AON HTE line map For slice 1 */
#define NV_AON_HTE_SLICE1_IRQ_GPIO_28
#define NV_AON_HTE_SLICE1_IRQ_GPIO_29

/* AON HTE line map For slice 2 */
#define NV_AON_HTE_SLICE2_IRQ_GPIO_0
#define NV_AON_HTE_SLICE2_IRQ_GPIO_1
#define NV_AON_HTE_SLICE2_IRQ_GPIO_2
#define NV_AON_HTE_SLICE2_IRQ_GPIO_3
#define NV_AON_HTE_SLICE2_IRQ_GPIO_4
#define NV_AON_HTE_SLICE2_IRQ_GPIO_5
#define NV_AON_HTE_SLICE2_IRQ_GPIO_6
#define NV_AON_HTE_SLICE2_IRQ_GPIO_7
#define NV_AON_HTE_SLICE2_IRQ_GPIO_8
#define NV_AON_HTE_SLICE2_IRQ_GPIO_9
#define NV_AON_HTE_SLICE2_IRQ_GPIO_10
#define NV_AON_HTE_SLICE2_IRQ_GPIO_11
#define NV_AON_HTE_SLICE2_IRQ_GPIO_12
#define NV_AON_HTE_SLICE2_IRQ_GPIO_13
#define NV_AON_HTE_SLICE2_IRQ_GPIO_14
#define NV_AON_HTE_SLICE2_IRQ_GPIO_15
#define NV_AON_HTE_SLICE2_IRQ_GPIO_16
#define NV_AON_HTE_SLICE2_IRQ_GPIO_17
#define NV_AON_HTE_SLICE2_IRQ_GPIO_18
#define NV_AON_HTE_SLICE2_IRQ_GPIO_19
#define NV_AON_HTE_SLICE2_IRQ_GPIO_20
#define NV_AON_HTE_SLICE2_IRQ_GPIO_21
#define NV_AON_HTE_SLICE2_IRQ_GPIO_22
#define NV_AON_HTE_SLICE2_IRQ_GPIO_23
#define NV_AON_HTE_SLICE2_IRQ_GPIO_24
#define NV_AON_HTE_SLICE2_IRQ_GPIO_25
#define NV_AON_HTE_SLICE2_IRQ_GPIO_26
#define NV_AON_HTE_SLICE2_IRQ_GPIO_27
#define NV_AON_HTE_SLICE2_IRQ_GPIO_28
#define NV_AON_HTE_SLICE2_IRQ_GPIO_29
#define NV_AON_HTE_SLICE2_IRQ_GPIO_30
#define NV_AON_HTE_SLICE2_IRQ_GPIO_31

#define HTE_TECTRL
#define HTE_TETSCH
#define HTE_TETSCL
#define HTE_TESRC
#define HTE_TECCV
#define HTE_TEPCV
#define HTE_TECMD
#define HTE_TESTATUS
#define HTE_SLICE0_TETEN
#define HTE_SLICE1_TETEN

#define HTE_SLICE_SIZE

#define HTE_TECTRL_ENABLE_ENABLE

#define HTE_TECTRL_OCCU_SHIFT
#define HTE_TECTRL_INTR_SHIFT
#define HTE_TECTRL_INTR_ENABLE

#define HTE_TESRC_SLICE_SHIFT
#define HTE_TESRC_SLICE_DEFAULT_MASK

#define HTE_TECMD_CMD_POP

#define HTE_TESTATUS_OCCUPANCY_SHIFT
#define HTE_TESTATUS_OCCUPANCY_MASK

enum tegra_hte_type {};

struct hte_slices {};

struct tegra_hte_line_mapped {};

struct tegra_hte_line_data {};

struct tegra_hte_data {};

struct tegra_hte_soc {};

static const struct tegra_hte_line_mapped tegra194_aon_gpio_map[] =;

static const struct tegra_hte_line_mapped tegra194_aon_gpio_sec_map[] =;

static const struct tegra_hte_line_mapped tegra234_aon_gpio_map[] =;

static const struct tegra_hte_line_mapped tegra234_aon_gpio_sec_map[] =;

static const struct tegra_hte_data t194_aon_hte =;

static const struct tegra_hte_data t234_aon_hte =;

static const struct tegra_hte_data t194_lic_hte =;

static const struct tegra_hte_data t234_lic_hte =;

static inline u32 tegra_hte_readl(struct tegra_hte_soc *hte, u32 reg)
{}

static inline void tegra_hte_writel(struct tegra_hte_soc *hte, u32 reg,
				    u32 val)
{}

static int tegra_hte_map_to_line_id(u32 eid,
				    const struct tegra_hte_line_mapped *m,
				    u32 map_sz, u32 *mapped)
{}

static int tegra_hte_line_xlate(struct hte_chip *gc,
				const struct of_phandle_args *args,
				struct hte_ts_desc *desc, u32 *xlated_id)
{}

static int tegra_hte_line_xlate_plat(struct hte_chip *gc,
				     struct hte_ts_desc *desc, u32 *xlated_id)
{}

static int tegra_hte_en_dis_common(struct hte_chip *chip, u32 line_id, bool en)
{}

static int tegra_hte_enable(struct hte_chip *chip, u32 line_id)
{}

static int tegra_hte_disable(struct hte_chip *chip, u32 line_id)
{}

static int tegra_hte_request(struct hte_chip *chip, struct hte_ts_desc *desc,
			     u32 line_id)
{}

static int tegra_hte_release(struct hte_chip *chip, struct hte_ts_desc *desc,
			     u32 line_id)
{}

static int tegra_hte_clk_src_info(struct hte_chip *chip,
				  struct hte_clk_info *ci)
{}

static int tegra_hte_get_level(struct tegra_hte_soc *gs, u32 line_id)
{}

static void tegra_hte_read_fifo(struct tegra_hte_soc *gs)
{}

static irqreturn_t tegra_hte_isr(int irq, void *dev_id)
{}

static bool tegra_hte_match_from_linedata(const struct hte_chip *chip,
					  const struct hte_ts_desc *hdesc)
{}

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

static const struct hte_ops g_ops =;

static void tegra_gte_disable(void *data)
{}

static void tegra_hte_put_gpio_device(void *data)
{}

static int tegra_hte_probe(struct platform_device *pdev)
{}

static int tegra_hte_resume_early(struct device *dev)
{}

static int tegra_hte_suspend_late(struct device *dev)
{}

static const struct dev_pm_ops tegra_hte_pm =;

static struct platform_driver tegra_hte_driver =;

module_platform_driver();

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