#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/thermal.h>
#include "../thermal_hwmon.h"
#define BCM2835_TS_TSENSCTL …
#define BCM2835_TS_TSENSSTAT …
#define BCM2835_TS_TSENSCTL_PRWDW …
#define BCM2835_TS_TSENSCTL_RSTB …
#define BCM2835_TS_TSENSCTL_CTRL_BITS …
#define BCM2835_TS_TSENSCTL_CTRL_SHIFT …
#define BCM2835_TS_TSENSCTL_CTRL_MASK …
#define BCM2835_TS_TSENSCTL_CTRL_DEFAULT …
#define BCM2835_TS_TSENSCTL_EN_INT …
#define BCM2835_TS_TSENSCTL_DIRECT …
#define BCM2835_TS_TSENSCTL_CLR_INT …
#define BCM2835_TS_TSENSCTL_THOLD_SHIFT …
#define BCM2835_TS_TSENSCTL_THOLD_BITS …
#define BCM2835_TS_TSENSCTL_THOLD_MASK …
#define BCM2835_TS_TSENSCTL_RSTDELAY_SHIFT …
#define BCM2835_TS_TSENSCTL_RSTDELAY_BITS …
#define BCM2835_TS_TSENSCTL_REGULEN …
#define BCM2835_TS_TSENSSTAT_DATA_BITS …
#define BCM2835_TS_TSENSSTAT_DATA_SHIFT …
#define BCM2835_TS_TSENSSTAT_DATA_MASK …
#define BCM2835_TS_TSENSSTAT_VALID …
#define BCM2835_TS_TSENSSTAT_INTERRUPT …
struct bcm2835_thermal_data { … };
static int bcm2835_thermal_adc2temp(u32 adc, int offset, int slope)
{ … }
static int bcm2835_thermal_temp2adc(int temp, int offset, int slope)
{ … }
static int bcm2835_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
{ … }
static const struct debugfs_reg32 bcm2835_thermal_regs[] = …;
static void bcm2835_thermal_debugfs(struct platform_device *pdev)
{ … }
static const struct thermal_zone_device_ops bcm2835_thermal_ops = …;
static const struct of_device_id bcm2835_thermal_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, bcm2835_thermal_of_match_table);
static int bcm2835_thermal_probe(struct platform_device *pdev)
{ … }
static void bcm2835_thermal_remove(struct platform_device *pdev)
{ … }
static struct platform_driver bcm2835_thermal_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;