linux/drivers/thermal/uniphier_thermal.c

// SPDX-License-Identifier: GPL-2.0
/*
 * uniphier_thermal.c - Socionext UniPhier thermal driver
 * Copyright 2014      Panasonic Corporation
 * Copyright 2016-2017 Socionext Inc.
 * Author:
 *	Kunihiko Hayashi <[email protected]>
 */

#include <linux/bitops.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/regmap.h>
#include <linux/thermal.h>

/*
 * block registers
 * addresses are the offset from .block_base
 */
#define PVTCTLEN
#define PVTCTLEN_EN

#define PVTCTLMODE
#define PVTCTLMODE_MASK
#define PVTCTLMODE_TEMPMON

#define EMONREPEAT
#define EMONREPEAT_ENDLESS
#define EMONREPEAT_PERIOD
#define EMONREPEAT_PERIOD_1000000

/*
 * common registers
 * addresses are the offset from .map_base
 */
#define PVTCTLSEL
#define PVTCTLSEL_MASK
#define PVTCTLSEL_MONITOR

#define SETALERT0
#define SETALERT1
#define SETALERT2
#define SETALERT_TEMP_OVF
#define SETALERT_TEMP_OVF_VALUE(val)
#define SETALERT_EN

#define PMALERTINTCTL
#define PMALERTINTCTL_CLR(ch)
#define PMALERTINTCTL_SET(ch)
#define PMALERTINTCTL_EN(ch)
#define PMALERTINTCTL_MASK

#define TMOD
#define TMOD_WIDTH

#define TMODCOEF

#define TMODSETUP0_EN
#define TMODSETUP0_VAL(val)
#define TMODSETUP1_EN
#define TMODSETUP1_VAL(val)

/* SoC critical temperature */
#define CRITICAL_TEMP_LIMIT

/* Max # of alert channels */
#define ALERT_CH_NUM

/* SoC specific thermal sensor data */
struct uniphier_tm_soc_data {};

struct uniphier_tm_dev {};

static int uniphier_tm_initialize_sensor(struct uniphier_tm_dev *tdev)
{}

static void uniphier_tm_set_alert(struct uniphier_tm_dev *tdev, u32 ch,
				  u32 temp)
{}

static void uniphier_tm_enable_sensor(struct uniphier_tm_dev *tdev)
{}

static void uniphier_tm_disable_sensor(struct uniphier_tm_dev *tdev)
{}

static int uniphier_tm_get_temp(struct thermal_zone_device *tz, int *out_temp)
{}

static const struct thermal_zone_device_ops uniphier_of_thermal_ops =;

static void uniphier_tm_irq_clear(struct uniphier_tm_dev *tdev)
{}

static irqreturn_t uniphier_tm_alarm_irq(int irq, void *_tdev)
{}

static irqreturn_t uniphier_tm_alarm_irq_thread(int irq, void *_tdev)
{}

struct trip_walk_data {};

static int uniphier_tm_trip_walk_cb(struct thermal_trip *trip, void *arg)
{}

static int uniphier_tm_probe(struct platform_device *pdev)
{}

static void uniphier_tm_remove(struct platform_device *pdev)
{}

static const struct uniphier_tm_soc_data uniphier_pxs2_tm_data =;

static const struct uniphier_tm_soc_data uniphier_ld20_tm_data =;

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

static struct platform_driver uniphier_tm_driver =;
module_platform_driver();

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