linux/drivers/thermal/renesas/rcar_thermal.c

// SPDX-License-Identifier: GPL-2.0
/*
 *  R-Car THS/TSC thermal sensor driver
 *
 * Copyright (C) 2012 Renesas Solutions Corp.
 * Kuninori Morimoto <[email protected]>
 */
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reboot.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/thermal.h>

#include "../thermal_hwmon.h"

#define IDLE_INTERVAL

#define COMMON_STR
#define COMMON_ENR
#define COMMON_INTMSK

#define REG_POSNEG
#define REG_FILONOFF
#define REG_THSCR
#define REG_THSSR
#define REG_INTCTRL

/* THSCR */
#define CPCTL

/* THSSR */
#define CTEMP

struct rcar_thermal_common {};

struct rcar_thermal_chip {};

static const struct rcar_thermal_chip rcar_thermal =;

static const struct rcar_thermal_chip rcar_gen2_thermal =;

static const struct rcar_thermal_chip rcar_gen3_thermal =;

struct rcar_thermal_priv {};

#define rcar_thermal_for_each_priv(pos, common)

#define MCELSIUS(temp)
#define rcar_priv_to_dev(priv)
#define rcar_has_irq_support(priv)
#define rcar_id_to_shift(priv)

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

/*
 *		basic functions
 */
#define rcar_thermal_common_read(c, r)
static u32 _rcar_thermal_common_read(struct rcar_thermal_common *common,
				     u32 reg)
{}

#define rcar_thermal_common_write(c, r, d)
static void _rcar_thermal_common_write(struct rcar_thermal_common *common,
				       u32 reg, u32 data)
{}

#define rcar_thermal_common_bset(c, r, m, d)
static void _rcar_thermal_common_bset(struct rcar_thermal_common *common,
				      u32 reg, u32 mask, u32 data)
{}

#define rcar_thermal_read(p, r)
static u32 _rcar_thermal_read(struct rcar_thermal_priv *priv, u32 reg)
{}

#define rcar_thermal_write(p, r, d)
static void _rcar_thermal_write(struct rcar_thermal_priv *priv,
				u32 reg, u32 data)
{}

#define rcar_thermal_bset(p, r, m, d)
static void _rcar_thermal_bset(struct rcar_thermal_priv *priv, u32 reg,
			       u32 mask, u32 data)
{}

/*
 *		zone device functions
 */
static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv)
{}

static int rcar_thermal_get_current_temp(struct rcar_thermal_priv *priv,
					 int *temp)
{}

static int rcar_thermal_get_temp(struct thermal_zone_device *zone, int *temp)
{}

static struct thermal_zone_device_ops rcar_thermal_zone_ops =;

static struct thermal_trip trips[] =;

/*
 *		interrupt
 */
#define rcar_thermal_irq_enable(p)
#define rcar_thermal_irq_disable(p)
static void _rcar_thermal_irq_ctrl(struct rcar_thermal_priv *priv, int enable)
{}

static void rcar_thermal_work(struct work_struct *work)
{}

static u32 rcar_thermal_had_changed(struct rcar_thermal_priv *priv, u32 status)
{}

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

/*
 *		platform functions
 */
static void rcar_thermal_remove(struct platform_device *pdev)
{}

static int rcar_thermal_probe(struct platform_device *pdev)
{}

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

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

static SIMPLE_DEV_PM_OPS(rcar_thermal_pm_ops, rcar_thermal_suspend,
			 rcar_thermal_resume);

static struct platform_driver rcar_thermal_driver =;
module_platform_driver();

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