linux/drivers/thermal/max77620_thermal.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Junction temperature thermal driver for Maxim Max77620.
 *
 * Copyright (c) 2016, NVIDIA CORPORATION.  All rights reserved.
 *
 * Author: Laxman Dewangan <[email protected]>
 *	   Mallikarjun Kasoju <[email protected]>
 */

#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/mfd/max77620.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/thermal.h>

#define MAX77620_NORMAL_OPERATING_TEMP
#define MAX77620_TJALARM1_TEMP
#define MAX77620_TJALARM2_TEMP

struct max77620_therm_info {};

/**
 * max77620_thermal_read_temp: Read PMIC die temperatue.
 * @data:	Device specific data.
 * @temp:	Temperature in millidegrees Celsius
 *
 * The actual temperature of PMIC die is not available from PMIC.
 * PMIC only tells the status if it has crossed or not the threshold level
 * of 120degC or 140degC.
 * If threshold has not been crossed then assume die temperature as 100degC
 * else 120degC or 140deG based on the PMIC die temp threshold status.
 *
 * Return 0 on success otherwise error number to show reason of failure.
 */

static int max77620_thermal_read_temp(struct thermal_zone_device *tz, int *temp)
{}

static const struct thermal_zone_device_ops max77620_thermal_ops =;

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

static int max77620_thermal_probe(struct platform_device *pdev)
{}

static struct platform_device_id max77620_thermal_devtype[] =;
MODULE_DEVICE_TABLE(platform, max77620_thermal_devtype);

static struct platform_driver max77620_thermal_driver =;

module_platform_driver();

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